Symbian3/PDK/Source/GUID-9EA7B72B-8394-48B8-A0CC-4BB34CBDB01C.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-9EA7B72B-8394-48B8-A0CC-4BB34CBDB01C" xml:lang="en"><title>UI text
strings</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Mobile device users can select the language used by their devices for
UI texts. Symbian platform native applications typically use these language
settings to determine which language is displayed when an application is launched.
The language used in your application depends on how you have implemented
your UI texts:</p>
<ul>
<li><p><i>Recommended</i>: In the recommended approach, text strings
in resource files are mapped to logical names in the code. This means that
your application can switch between different language packs according to
locale and the wishes of the end-user.</p></li>
<li><p><i>Not recommended</i>: If you hard code text strings into
your code, then your application will only be in the language used in the
code and will not be able to take advantage of the flexibility made available
by the recommended approach described approach.</p></li>
</ul>
<p>In the recommended approach, when the application framework launches
an application, it loads the application resource file. The application framework
compares the system locale language setting with the available resource files,
and loads the resource file whose extension matches the locale language code.
If there is no match, then the system loads the resource file with the extension <parmname>rsc</parmname>.</p>
<p>For example, if the language of a device is set to German, then the
application framework attempts to find a resource file for the application
with the extension <parmname>r03</parmname>, since <parmname>03</parmname> is
the code for German. If there is no resource file with a matching extension,
then the application framework loads the resource file for the application
with the extension <parmname>rsc</parmname>.</p>
<p>In order to ensure that your application will be localizable:</p>
<ul>
<li><p>Do not embed UI text strings in your code files</p></li>
<li><p>Do not hard code the size of text buffers</p></li>
</ul>
</conbody></concept>