Languages

Menu
Sites
Language
What should I do when system language change?

In my html and js ,I support many kinds of language

I change system language from en_US to ko_KR ,but my web app

can't change its language string ,I have to kill my app and launch it again

then,it works.

so what can I do to improve it.

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

9 Replies
Alexander AVSukhov
Hi tattoo wu, You can try use SystemInfo API: https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.w3c.apireference%2Fw3c_api.html and add event listener (addPropertyValueChangeListener()) to system property LOCALE
talari praveen kumar
hi please try this code tizen.systeminfo.getPropertyValue("LOCALE",onSuccessCallback,onErrorCallback); function onSuccessCallback(locale) { console.log("The display language is " + locale.language); lang=locale.language; place=locale.country; var displaylang= lang.slice(0,2); console.log(displaylang); Globalize.addCultureInfo("default", { messages: { "hello": "hello", "world": "world" } }); Globalize.addCultureInfo(displaylang, { messages: { "world": "mundo" } }); Globalize.culture(displaylang); if( Globalize.localize("world")== "mundo"){ console.log("Key exists in current culture"+displaylang); } else console.log("key not exists"); } function onErrorCallback(error) { console.log("An error occurred " + error.message); }
Imam Mohammad Bokhary

please let me know why I've found there "undefined" values.

Imam Mohammad Bokhary

Would you please provide me a sample project for globalize culture customizable language change ??

daniel kim

Hi,

I found document about globalization and wish this will help you.

https://developer.tizen.org/documentation/articles/localization

 

 

Imam Mohammad Bokhary

but the Globalize.localize( 'hello' ) and customCultureFiles[lang] resulted 'undefined'

AVSukhov

Hello,

For more info see:

https://github.com/jquery/globalize

Imam Mohammad Bokhary

There is currency, date, message, number but not localize or culture. I followed the link https://developer.tizen.org/documentation/articles/localization
but the output value has resulted "undefined".

AVSukhov

Hello,

Please use following link for culture:

https://github.com/jquery/globalize/tree/79ae658b842f75f58199d6e9074e01f7ce207468