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