diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FEFAF39-7048-4F4A-8676-C4BF1AF37120.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FEFAF39-7048-4F4A-8676-C4BF1AF37120.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,20 @@ + + +Localizing widget layout

Localizing widget layout

You can enhance user experience by providing different versions of the widget layout based on the supported languages. For example, when a language is read from right to left, it is recommended that you align the display text and UI elements to the right side, which contrasts with the layout typically used for languages that are read from left to right.

+

To localize the layout of a widget

    +
  1. Create localized CSS files with style information for the languages that require localization.

    The name of the CSS file is arbitrary, but the name must be identical for all supported languages so that you need to specify the name only once in the main HTML document.

  2. +
  3. Store the files into the appropriate language project directories.

  4. +
  5. Import the CSS file in the main HTML file using the @import directive within the <style> tag.

  6. +
  7. Provide a default CSS file with generic style information and store it into the root directory of your widget.

    If a specific language does not require layout localization, the CSS file does not need to be included in the corresponding language project directory. When that language is set as the device language, the default CSS file is loaded and used.

  8. +
+

Example

The following pieces of code provide an example of widget layout localization for Finnish and for a default case:

Specified in the main HTML document:

<style type="text/css">
+   @import "localizedLayout.css";
+</style>

Localized resource location:

[root]\fi.lproj\
+    localizedLayout.css
+

Default resource location:

[root]\
+    localizedLayout.css
+
+
\ No newline at end of file