×
Namespaces

Variants
Actions

Localising images in Symbian Web Runtime

From Nokia Developer 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
Compatibility
Platform(s): S60 5th Edition, S60 3rd Edition FP2
S60 5th Edition
S60 3rd Edition FP2
Article
Keywords: localization
Created: MiGryz (26 Feb 2009)
Last edited: hamishwillee (04 Oct 2012)

Contents

Overview

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 />

Postconditions

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 09:05.
91 page views in the last 30 days.
×