diff options
author | Hyeoncheol Choi <hc7.choi@samsung.com> | 2013-09-27 17:23:54 +0900 |
---|---|---|
committer | heeju Joo <heeju.joo@samsung.com> | 2013-10-04 14:18:25 +0900 |
commit | ba956cf50894443bd17326d558fb9e906c7be8d6 (patch) | |
tree | 232be5e721048d5540d645cce2ec211f8ab50aff | |
parent | ece819d8b073045133e0cf2286b18e5d1ed18381 (diff) | |
download | web-ui-fw-ba956cf50894443bd17326d558fb9e906c7be8d6.tar.gz web-ui-fw-ba956cf50894443bd17326d558fb9e906c7be8d6.tar.bz2 web-ui-fw-ba956cf50894443bd17326d558fb9e906c7be8d6.zip |
Loader : change rule that language is set by region setting(N_SE-53277)
Tizen has a rule that language is set by region setting.
Change-Id: I4b569ab6849dcfd09186eae401d23d0421c2bc7f
-rw-r--r-- | src/js/jquery.mobile.tizen.loader.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/js/jquery.mobile.tizen.loader.js b/src/js/jquery.mobile.tizen.loader.js index 46d5320d..e965bdc7 100644 --- a/src/js/jquery.mobile.tizen.loader.js +++ b/src/js/jquery.mobile.tizen.loader.js @@ -373,12 +373,22 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica return lang; }, setGlobalize: function ( ) { - var lang = this.loadGlobalizeCulture( ); - - // Set culture - // NOTE: It is not needed to set with neutral lang. - // Globalize automatically deals with it. - Globalize.culture( lang ); + var lang, + self = this; + /* + * Tizen has rule that language was set by region setting + */ + if( window.tizen ) { + window.tizen.systeminfo.getPropertyValue( "LOCALE" , function( locale ) { + var lang = locale.country ? locale.country : undefined; + lang = lang.replace("_","-"); + lang = self.loadGlobalizeCulture( lang ); + Globalize.culture( lang ); + }); + } else { + lang = this.loadGlobalizeCulture(); + Globalize.culture( lang ); + } }, /** * Load custom globalize culture file |