×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    localization in run time like built-in applications

    Hi

    I want to implement localization in run time, i. e. have the same behavior as built-in applications:
    - user changes the phone language
    - user reboots phone
    --> my application loads in the selected language
    It means that after installation an application should have resources for all supported languages.

    There are some samples in SDK connected with localization issues, but all of them perfom localization during installation (copy appropriate resource file).

    I know that I can get a current language using User::Language, but is there a standard way to handle resources in this case?

    Thanks, Yaroslav

    Platform: Series 60

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    6

    m

    Hi,

    You can use StringDB for your multi-language software.
    No source files for strings.
    It is a OS independent file that you can load at runtime to get the strings.

    You can also change languages/strings at runtime.

    And you dont have to recompile app for language or string changes.

    The tool directly converts string tables in MS Excel files to StringDB.

    You can get read more about it from www.swbox.com.

  3. #3
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hi,

    There is no need to do any tricky issues. All and everything one must do is to compile resource for each supported language. Obviously all needed language dependend issues must be declared in the resource file. Thi is easy to implement if strings etc are declared in the language dependent header files, called localisation files, and during compilation there is selected correct header for compilation.

    Result should be something like:
    Code:
    system\apps\sample.app [application binary]
    system\apps\sample.rsc [resource file for: ELangTest,]
    system\apps\sample.r01 [resource file for: ELangEnglish]
    system\apps\sample.r03 [resource file for: ELangGerman]
    system\apps\sample.r09 [resource file for: ELangFinnish]
    etc. See enum TLanguage

    user will change the language and application is using resource file e.g load some string value, the framework will select language specific resource file automatically.

    ...and how to compile to each language, you should change or create MMp file for each language and there is statement LANG SC, e.g. for finnish language you should define LANG 09

    If you are using resource in dll project there is need to search correct resource file at the same time the resource is loded (see BaflUtils::NearestLanguageFile and AddResourceFileL)

    Hope this small info helps to proceed...

    Br V

    [edit: Quite old topic :-)))) ]

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    13

    Re: localization in run time like built-in applications

    Hi,

    I am trying to get the same target, this is, to have an application in which the user can change the language in the runtime.

    I have created my .lxx files, and have added them to the .pkg, and it doesn't crash. The trouble is that I don't know how to tell the phone to use the language resource file the user has specified.

    I guess I should use the AddResourceFileL, but I don't know how.

    Any idea?

    Thanks :-)

    Marta

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×