Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Localising images in Symbian Web Runtime

From Wiki
Jump to: navigation, search

This code snippet demonstrates how to localise images in Symbian Web Runtime.

Article Metadata
Code ExampleTested with
Devices(s): Nokia 5800 XpressMusic, Nokia 6220 Classic
Platform(s): S60 5th Edition, S60 3rd Edition FP2
S60 5th Edition
S60 3rd Edition FP2
Keywords: localization
Created: MiGryz (26 Feb 2009)
Last edited: hamishwillee (04 Oct 2012)



To localise the images, you should place files for the default language in the root directory of your widget and the localised files into subfolders named "***.lproj", without quotes, where *** is the language code. For example:

/img.png  (the image for the default language)
    /en.lproj/img.jpg  (the English image)
    /ru.lproj/img.jpg  (the Russian image)
    /de.lproj/img.jpg  (the German image)

For the list of language codes, see Web Runtime localisation support.

Source: Relevant HTML components

<hr />
<!-- Just refer to the image by its name. The WRT selects the right image from
the .lproj folders depending on the language settings of the device. -->
<img src="img.jpg" alt="image" />
<hr />


Upon loading, an image is displayed between two horizontal lines. On the image you can see "En", "De", "Ru", or "Def" depending on whether your phone uses English, German, Russian, or some other language, respectively.

Supplementary material

This code snippet is part of the stub concept, which means that it has been patched on top of a template application in order to be more useful to developers. The version of the WRT stub application used as a template in this snippet is v1.1.

This page was last modified on 4 October 2012, at 06:05.
41 page views in the last 30 days.