Closed mickgeek closed 9 years ago
@mickgeek Thank you for this pull request, but I think it should be left to the coder to specify the language, don't you agree? I think is kind of hacky this way and also the requirement to scan the the language dir previous rendering slows down the performance of the widget.
I don't think that scanning the directory with fifty lightweight files very slows down the performance. But I agree, this solution is not the best. If language translations would be merged into one file (as in the yii\jui\DatePicker
widget), for a full locale code will be checked two language options (if first is not found), according to the picker documentation.
And please tell me whether there is a simple way to change the correct language depending on the language property in the application (eg ru-RU
)?
The way is stated is just a matter to set its language
attribute.
With an empty
language
property value these changes are automatically assigned to the picker the current application language. I think this is a good solution for multilingual systems. Also, if specify a full code (egru-RU
), the picker will first check for anru-RU
language and if not found will check for aru
language.