I have tried and have not been able to figure out, other than hard-coding region information, how to get the loader to pick up the correct regional settings when the full region or autoDetectLocale are set.
For example, if we set the regional to de-DE, then not all of the settings are picked up. Basically, we found that the only way to get both the grid and editors to use the same settings was to examine the region code and, if it is one where a specific region file exists, we can set loader.regional and loader.locale to the full region. Otherwise, if the file doesn't exist, we have to just set locale to the first two characters of the region code and set regional to null.
For example:
switch (sCurrentRegion) { case 'en-AU': case 'en-CA': case 'en-IE': case 'en-NZ': case 'en-GB': // Handle missing regions loader.regional = 'en-GB'; loader.locale = 'en-GB'; break; case "fr-CH": case "pt-BR": case "sr-SR": case "zh-CN": case "zh-HK": case "zh-TW": loader.regional = sCurrentRegion; loader.locale = sCurrentRegion; break; default: // No region file, so drop the locale down to the first two chars and clear the region that we use. loader.locale = sCurrentRegion.substr(0, 2); locale.regional = null; break;}
Karl,
The loader does not keep a list of the regional files it recognizes. So you are free to create as many additional ones as you need. In your case you can simply clone infragistics.ui.regional-de.js to infragistics.ui.regional-de-DE.js and put both of the files side by side. That way the loader will find this settings by the full name of locale as well as by the short one.
I had provided the information in the original problem post: if you set to autoDetectLocale and you are in a DE-de environment or you set loader.regional to DE-de, the regional settings are not picked up.
Hi Louis,
In order to help you acheive your goals we need some more info regarding the loader, more specific in which case the loader works correctly to your scenario and in which it doesn't
Thanks,
Todor Paskalev
Infragistics
Hello Karl,
Thank you for the clarification.
We will investigate this further and will let you know about the progress.
In the meantime I created a support ticket on your behalf regarding this : CAS-116129-L3H1C3
Sorry, you did not understand my issue: we are using the standard files and settings that Infragistics provides including i18n, but they don't work in many regional cases.