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
This code snippet demonstrates how to localise images in Symbian Web Runtime.
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
<!-- 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" />
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.
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.
- The patched, executable application that can be used to test the features described in this snippet is available for download at Media:Localizing images in WRT.zip.
- For general information on applying the patch, see Using Diffs.
- For unpatched stub applications, see Example app stubs with logging framework.