kafsinkaf
10-22-2007, 05:25 AM
While adopting my application from YUI to ExtJS, I have noticed that there is a level of localization support in ExtJS but there is also some room for improvement. To my understanding, localization is achieved by adding the following lines to your html file:
<!-- include the locale file -->
<script type="text/javascript"src="ext/locale/ext-lang-<locale>-min.js"></script>
This approach may work well if your application targets some specific locales that you know in advance but has some shortcomings if your application is a generic one. You can not specify a locale to use if the corresponding translation file does not exist. As an example, you can not use Portuguese locale (pt) or Iberian Portuguese (pt_PT) as there is no corresponding localization file ext-lang-pt.js or ext-lang-pt_PT.js exists in ext-2.0-beta1 distribution. You should know that the only existing Portuguese localization is for pt_BR. On the other hand, there is only a generic German localization file.
My suggestion would be to add explicit locale support to ExtJS API where in minimum the locale to be used is set via a method call rather than relying of the locale specific files mentioned by html files and ExtJS figures out which localization file to use with a fall-back scenario similar to the resource file handling in Java. I guess this approach will be much more developer friendly for those who develop products for the international market.
My aim is to positively contribute to the quality and robustness of ExtJS.
<!-- include the locale file -->
<script type="text/javascript"src="ext/locale/ext-lang-<locale>-min.js"></script>
This approach may work well if your application targets some specific locales that you know in advance but has some shortcomings if your application is a generic one. You can not specify a locale to use if the corresponding translation file does not exist. As an example, you can not use Portuguese locale (pt) or Iberian Portuguese (pt_PT) as there is no corresponding localization file ext-lang-pt.js or ext-lang-pt_PT.js exists in ext-2.0-beta1 distribution. You should know that the only existing Portuguese localization is for pt_BR. On the other hand, there is only a generic German localization file.
My suggestion would be to add explicit locale support to ExtJS API where in minimum the locale to be used is set via a method call rather than relying of the locale specific files mentioned by html files and ExtJS figures out which localization file to use with a fall-back scenario similar to the resource file handling in Java. I guess this approach will be much more developer friendly for those who develop products for the international market.
My aim is to positively contribute to the quality and robustness of ExtJS.