Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1085
Regional setting processing doesn't appear to work correctly in all cases
posted

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;
}

Parents Reply Children
No Data