Localizability

This chapter lists the key issues that must be taken into account to ensure that S60 software is localizable and describes how to handle these issues.

Localizability is only one aspect of internationalization. However, it is an important part due to the number of language variants provided by the S60 platform. It means that the software is enabled to be localized into different language versions.

This chapter lists some of the key issues to be taken into account for the localizability of the software based on the S60 localization processes.

  • Create localization text (.loc) files

    The localized text strings cannot be put into the resource file (.rss file). Use logical names in the resource file and put the text strings in a separate resource header file (.loc). The original .loc file is the file that is created by software developers (coder) to handle UI texts, which is then localized to different languages by the localization team.

    Software developers must create an original .loc file with all the elements needed for localizability. The UI text strings in the original .loc file are localized into different language versions.

    • See the .loc file template. The template is provided for reference only and can be found in the Appendix E.

    • All the elements of the .loc file must be available in correct format and correct content.

    • All elements (logical name, description, layout ID, engineering English) must be available

    • Use the same logical names, layout, and engineering English as defined in UI specifications

    • Engineering English should only be the reference text for localization, and the localization team should make localized English with a consistent style and terminology.

    • Avoid concatenation of texts and use replaceable parameters.

  • Use StringLoader to allow for repositioning of parameter variables

    • Use parameters to handle replaceable parts. There might be one or more parameters in a text string. The parameters must be in correct formats. %N stands for numeric variable. %U stands for Unicode variable.

      For example: %N is used for numbers. 1 missed call. %N missed calls.

      %U is used to present a text string. %U selected. Phone will restart. Continue?

    • If there are several parameters, use the number for the parameters.

      For example: Download and install %0U %1U supplied by %2U (%3U kB)?

      %0U represents the application name, %1U represents the version of the application, %2U represents the application supplier, and %3U represents the size of the application.

    • The order of the parameters in a text string can be changed in localized texts depending on different languages.

  • Do not hard-code text strings

    To hard-code or hard-coding refers to the software development practice of embedding output data directly into the source code of a program or some other executable object, instead of obtaining that data from external sources or generating it by the program itself with the given input.

    Hard-coding prevents the text strings from being localized into different languages.

    File and folder names may need to be localizable. If the file or folder name is visible to the end user, it must be possible to be localized.

  • Allow for text expansion in the layout

    Each language has it own length for words and sentences. English is a relatively compact language. Normally Chinese sentences are shorter, and some European languages have longer words and sentences, for example, German and Finnish.

    Table: General text expansion guidelines

    Number of characters in English text

    How much longer can a localized text be

    1 - 4

    400%

    5 - 10

    100%

    11 - 20

    70%

    21 - 30

    50%

    31 - 50

    30%

    Over 50

    20%

    For example: when "To" is translated into Finnish, it might become "Vastaanottaja" ( = Recipient) and "OK" is "Aceptar" in Spanish.

    Abbreviation is not a good solution if a UI text string is too long. Using too many abbreviations confuses or misleads the end users by giving an incomplete meaning. In addition, some languages, such as Arabic, Hebrew, Chinese, and Japanese, do not allow abbreviating words.

    For the above-mentioned reasons, UI items should be designed to allow the UI texts to expand.

  • For time and date formats, use time and date formatters provided by AVKON

    If a date should be shown on the UI screen, the application has to use logical names which refer to time and date format in the AVKON resource file. For example, if "01.09.2000" will be displayed, logical name r_qtn_date_usual_with_zero is used. Logical names for AVKON resources are listed in avkon.rsg as #define statements.

    All the details are listed in the tables below.

    Applications should use the logical resource names listed in the table "Common date and time format strings" and then format the time/date with a common component (or TTime's FormatL) method.

Table: Common date and time format strings

Logical name

Example

Formatting string

Comment

TIME

r_qtn_time_usual

1:20 , 1:20 am, 13:05, pm 1:05

"%-B%:0%*J%:1%T%:3%+B"

Separators are locale dependent.

r_qtn_time_usual_with_zero

01:20, 1:20 am, 13:05, pm 1:05

"%-B%:0%J%:1%T%:3%+B"

Separators are locale dependent.

r_qtn_time_long

13:20:45, 1:20:45 pm, 1:02:05, 1:02:05 am

"%-B%:0%*J%:1%T%:2%S%:3%+B"

Separators are locale dependent.

r_qtn_time_long_with_zero

13:20:45, 1:20:45 pm, 01:02:05, 1:02:05 am

"%-B%:0%J%:1%T%:2%S%:3%+B"

Separators are locale dependent.

DATE

r_qtn_date_short

1.9.00, 00.9,1

"%*D%*M%*Y%/0%1%/1%2%/2%3%/3"

Order and separators are locale dependent.

r_qtn_date_short_with_zero

01.09.00, 00.09.01

"%D%M%*Y%/0%1%/1%2%/2%3%/3"

Order and separators are locale dependent.

R_qtn_date_usual

1.9.2000, 2000.9,1

"%*D%*M%Y%/0%1%/1%2%/2%3%/3"

Order and separators are locale dependent.

r_qtn_date_usual_with_zero

01.09.2000, 2000.09.01

"%D%M%Y%/0%1%/1%2%/2%3%/3"

Order and separators are locale dependent.

r_qtn_date_without_year

25.12, 12/25, 4.5

"%*D%*M%/0%4%/1%5"

Order and separators are locale dependent.

r_tn_date_without_year_with_zero

25.12, 12/25, 04.05

"%D%M%/0%4%/1%5"

Order and separators are locale dependent.

DURATION

r_qtn_time_durat_short

13:15, 3:05

"%:0%*H%:1%T%:3"

Separators are locale dependent. (hours and minutes without seconds)

r_qtn_time_durat_short_with_zero

13:15, 03:05

"%:0%H%:1%T%:3"

Separators are locale dependent. (hours and minutes without seconds)

r_qtn_time_durat_long

13:55:23, 3:15:12

"%:0%*H%:1%T%:2%S%:3"

separators are locale dependent. (hours, minutes, and seconds)

r_qtn_time_durat_long_with_ zero

13:55:23, 03:15:12

"%:0%H%:1%T%:2%S%:3"

Separators are locale dependent. (hours, minutes, and seconds)

r_qtn_time_durat_min_sec

13:15, 3:05

"%:0%*T%:2%S%:3"

Separators are locale dependent. (minutes without leading zero and seconds)

r_qtn_time_durat_min_sec_ with_zero

13:15, 03:05

"%:0%T%:2%S%:3"

Separators are locale dependent. (minutes with leading zero and seconds)

Table: Full listing of Symbian OS date and time formatter syntax

Separators

%:n

Time separator from locale (n is the number of the separator 0-3).

%/n

Date separator from locale (n is the number of the separator 0-3).

Locale- indipendent formatting

%F

Makes the date/time formatting independent of the system setting. If dependent formatting characters follow, %F is interpreted as toggle.

%A

AM or PM text from locale.

%B

As %A, except that the am/pm text is only inserted if the system clock setting is 12 hour. (%B should be used in conjunction with %J.).

%D

Day in two digits.

%E

Day name.

%W

Week in two digits.

%M

Month in two digits.

%N

Month name.

%H

24 hour in two digits.

%I

12 hour in two digits.

%J

24/12 hour according to system setting. If 12, there is no leading zero.

%S

Seconds in two digits.

%T

Minutes in two digits.

%X

Day suffix from locale.

%Y

Year in four digits.

%Z

Three digit day number in year.

Locale- dependent formatting

1%

First component in three component date (DateFormat in Locale).

2%

Second component in three component date (DateFormat in Locale).

3%

Third component in three component date (DateFormat in Locale).

4%

First component in two component date (DateFormat in Locale).

5%

Second component in two component date (DateFormat in Locale).

6%

Hour as in system setting.

7%

AM or PM text from locale if 6% = 12 hour clock.

Toggels

%F

Toggle days (displayed by %1, %2, or %3) between numeric and name formats.

%O

Toggle months (displayed by %1, %2, or %3) between numeric and name formats.

%G

Toggle short/long format for %1.

%P

Toggle short/long format for %2.

%U

Toggle short/long format for %3.

%L

Toggle day suffix from locale on/off.

Modifiers

*

Abbreviate this item (use between % and n).

  • In an .mmp file, use the language statement LANG

    This is to reduce the development workload later on if new languages are introduced. This solution requires a conditional variant building at build time. If the conditional build system is not used, the LANG statement should have the locale IDs of each language, for example,;

    LANG 01 (= UK English)

    LANG 04 (= Spanish)

    LANG 09 (= Finnish)