语言

Menu
Sites
Language
Web app Localization

I need to use localization in my web application, can we use chrome.i18n APIs in Tizen?.

I found a article about using chrome.i18n APIs in Tizenhttps://developer.tizen.org/documentation/localization

I tried localization wizard given in the SDK its making copy of source files for each language, but we are looking for separet message files for each language and using that message name in html and javascript.

We are using Tizen 2.0.0 SDK,

 

 

 

 

 

 

 

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

2 回复
Marco Buettner
We found for us a very useful procedure. You can use this small script http://services.scidev.eu/developers/project/tizen/msg.zip Only add more elements on the map and dont change the structur of the language files... Only change the language type "en-GB" to your needed language.
Raghavendra Reddy Shiva
Yes, the SDK localization wizard creates source files for all the languages selected. The document you are referring, describes how to structure the locales directories and the required files (manifest.json)in the project, when you wish to have multiple messages file for all the supported languages. That means each locale will have a seperate "message.json" file. In short , you should have one "manifest.json" file defined for the default locale and "messages.json" file for each locale. And the messages can be retrieved using the I18n method "getMessage" as below, // In JavaScript code var name= chrome.i18n.getMessage("appName"); //And When you want to supply and use a string // In JavaScript code status.innerText = chrome.i18n.getMessage("error", errorDetails); // In messages.json "error": { "message": "Error: $details$", "description": "Generic error template. Expects error parameter to be passed in.", } More reference on I18n here, http://developer.chrome.com/extensions/i18n.html#examples-getMessage Refer the sample apps for the I18n "getmessage" usuage. https://01.org/html5webapps/webapps/hangonman