diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F29096-C1A3-45DB-9E2F-6110562E0237.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F29096-C1A3-45DB-9E2F-6110562E0237.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,37 @@ + + +
You might need to localize widget resources, such as images, to +support multiple languages.
+Create localized versions +of the resources for the languages that require localization.
Store the files into +the appropriate language +project directories.
Provide default resources +in the widget root directory.
If a specific language does +not require resource localization, the resource files do not need to be included +in the corresponding language project directory. When that language is set +as the device language, the default resources are loaded and used.
When loading a localized resource, specify the path to the resource +file as relative to the widget root directory.
The following pieces of code provide an +example of widget resource localization for Finnish, English and for a default +case.
Add the Finnish flag for use when system language is Finnish:
[root]\fi.lproj\ + flag.png
Add the English flag for use when the system language is English:
[root]\en.lproj\ + flag.png
Add the UN flag for use with any other system language:
[root]\ + flag.png
In the JavaScript file that implements the logic of the widget, create +the following code to load and show the appropriate flag dynamically. :
var flag = document.createElement('img'); +flag.setAttribute('src', 'flag.png'); +