Opened 12 years ago

#519 new defect

Fusion always ignores the regional extension of the specified language

Reported by: wuma Owned by: madair
Priority: P2 Milestone: Future
Component: Core Version: 2.0
Severity: Major Keywords:
Cc: mars.wu@… Browser: All
External ID: Operating System: All
state: New

Description

In line #1374 of fusion.js, I found the logic detecting the current language always ignores the regional extension and try to load the corresponding resource js files without reginal extension:

//determine the language to use and add resource bundles to be loaded to the core scripts
var locale = navigator.language ?
                  navigator.language.substring(0,2):    //e.g. en-CA becomes just en                  
                  navigator.userLanguage.substring(0,2);//only use the prefix part for now, 

line #1415:

if (locale != 'en') {
    coreScripts.push('lib/OpenLayers/Lang/'+locale+'.js');
    coreScripts.push('text/'+locale+'.json');
    }

Then for example if the specified language is cs-CZ, Fusion will always try to load cs.js from OpenLayers lib. While their is no cs.js. As a result, the strings from OpenLayers will be always English for Czech language.

Change History (0)

Note: See TracTickets for help on using tickets.