×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Default language for localization

    Hi all,

    I'll offer my app in different languages. Now my problem is: if the phone is set to a language not included in the sis, all strings won't load. I'd like to use english as a default language in this case, how can this be accomplished?

    thanks,

    Chris

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Default language for localization

    Provide a "standard" .rsc file amongst the localized ones.

  3. #3
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    hum, I do not use .rsc files, but rather a .loc and several .l01, .l03... files with localized strings. Do I miss something?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Default language for localization

    Quote Originally Posted by -chris- View Post
    hum, I do not use .rsc files, but rather a .loc and several .l01, .l03... files with localized strings. Do I miss something?
    then one of the .lxx files

  5. #5
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    but where? in the .loc file, i have code like
    Code:
    #ifdef LANGUAGE_01      // language code for UK
    
    #include "..\data\cameraapp_loc.l01"
    
    #elif defined LANGUAGE_03   // language code German
    
    #include "..\data\cameraapp_loc.l03"
    
    #elif defined LANGUAGE_09   // language code Finnish
    
    #include "..\data\cameraapp_loc.l09"
    
    #endif
    do I have to put something here?

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Default language for localization

    Code:
    #ifdef LANGUAGE_01      // language code for UK
    #include "..\data\cameraapp_loc.l01"
    #elif defined LANGUAGE_03   // language code German
    #include "..\data\cameraapp_loc.l03"
    #elif defined LANGUAGE_09   // language code Finnish
    #include "..\data\cameraapp_loc.l09"
    #else                      // language code for UK As default
    #include "..\data\cameraapp_loc.l01"
    
    #endif

  7. #7
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    works like a charm, thanks!

    The only problem left: if my phone is set to a language not included in the software, it displays a box "choose language" during install. the choice has no effect, the english default works. So how can I

    - either suppress the choice box
    - or use the language selected in the choice box as the default

    ?

  8. #8
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    an y idea for the choice box?

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Default language for localization

    Quote Originally Posted by -chris- View Post
    works like a charm, thanks!

    The only problem left: if my phone is set to a language not included in the software, it displays a box "choose language" during install. the choice has no effect, the english default works. So how can I

    - either suppress the choice box
    - or use the language selected in the choice box as the default

    ?
    can you show us your pkg file.

  10. #10
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Default language for localization

    Hi,

    I guess you could detect the phone language based on that you could have a check or logic in your application to detect whether you have localized to that language or not. If not you could set your default language
    by deleting existing resource file using
    CCoeEnv::Static()->DeleteResourceFile()
    and setting your default resource file using
    CCoeEnv::Static()->AddResourceFileL(resFileName);
    Regards,
    Sriky

  11. #11
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    But Sriky, that would not circumvent the problem, would it? The user would still be shown the list of languages during installation, and after the installation, i would not know, which language he chose...

    my .pkg file is:
    Code:
    ; Installation file for CameraApp application
    ;
    ;Language - standard language definitions
    &EN,GE,FI
    
    ; standard SIS file header
    #{"CameraApp", "CameraApp", "CameraApp"},(0xE0000001),2,2,0
    
    ;Localised Vendor name
    %{"test", "test", "test"}
    
    ;Unique Vendor name
    :"test"
    
    ;Supports S60 3rd Edition
    [0x101F7961], 0, 0, 0, {"Series60ProductID", "Series60ProductID", "Series60ProductID"}
    
    ;Files to install
    
    "$(EPOCROOT)Epoc32\release\gcce\urel\CameraApp.exe"
                                        - "!:\sys\bin\CameraApp.exe"
                                        
    "$(EPOCROOT)Epoc32\Data\z\resource\apps\CameraApp.RSC"
                                        - "!:\resource\apps\CameraApp.RSC"
                                     
    "$(EPOCROOT)Epoc32\Data\z\private\10003a3f\apps\CameraApp_reg.RSC"    
                              -"!:\private\10003a3f\import\apps\CameraApp_reg.RSC"
    
    ;Icon resources
    "$(EPOCROOT)Epoc32\Data\z\resource\apps\CameraApp_aif.mif"
                              -"!:\resource\apps\CameraApp_aif.mif"
    ;Icon resources
    "$(EPOCROOT)Epoc32\Data\bitmaps.mbm"
                              -"!:\resource\apps\bitmaps.mbm"
    
    ;Language resources
    "$(EPOCROOT)Epoc32\data\z\resource\apps\cameraapp.r01" -"!:\resource\apps\cameraapp.r01"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\cameraapp.r03" -"!:\resource\apps\cameraapp.r03"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\cameraapp.r09" -"!:\resource\apps\cameraapp.r09"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\cameraapp_reg.rsc" -"!:\private\10003a3f\import\apps\cameraapp_reg.rsc"
    
    ;Help resources
    ;{
    ;"..\help\CameraApp_sc.hlp"
    ;"..\help\CameraApp_09.hlp"
    ;} -"!:\resource\help\cameraapp_help.hlp"
    
    ; notification sounds
    "..\data\Camera1a_2_8kHz.wav" - "!:\private\E0000001\Camera1a_2_8kHz.wav"
    "..\data\focused.wav" - "!:\private\E0000001\focused.wav"
    \kamerabenutzt.wav"
    "..\data\beep.wav" - "!:\private\E0000001\beep.wav"
    "..\data\buzz.wav" - "!:\private\E0000001\buzz.wav"
    "..\data\accept.wav" - "!:\private\E0000001\accept.wav"
    "..\data\electric.wav" - "!:\private\E0000001\electric.wav"
                                      
    ; remove comment to enable engine debug logging
    ; "log.txt" - "c:\Logs\CAMERAEX\log.txt"
    
    
    "backup_registration.xml"-"!:\private\E0000001\backup_registration.xml"

  12. #12
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Default language for localization

    Hi Chris,

    You could use CPtiEngine to get the available languages on the phone and User::Language() to get the current language on the phone I guess it should be sufficient for you to determine what to set as default language.
    Regards,
    Sriky

  13. #13
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Default language for localization

    Hi,
    Why dont you make a change in your pkg file so that it wont ask you to select the language on installation. Then your application will always have default language as English.
    Maximus
    S60 Developer
    Impossible is nothing

  14. #14
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    105

    Re: Default language for localization

    Hi Yogpan,

    can you tell me how to change this? Is it the

    &EN,GE,FI

    line?

    @Sriky: but that's the functionality what is already working with skumar's patch: if my app supports the phone language, it's localized - if not, it's in english. What I want to do is supress the language choice box (which actually only comes up, if the phone language is NOT supported by my app), or set the default language to the language selected by the user in the language choice box.

  15. #15
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Default language for localization

    Hi,
    You got it right !!! just put only &EN in place and it will not ask for language selection.Hope it will solve your problem.
    Maximus
    S60 Developer
    Impossible is nothing

Similar Threads

  1. Changing the default language
    By lamiaaMB in forum Mobile Java General
    Replies: 4
    Last Post: 2008-08-07, 16:39
  2. Java App Midlet certification (new thread)
    By mocad_tom in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2008-06-24, 04:12
  3. OMA CP : Setting DEFAULT APN
    By w3ncy in forum OMA DM/DS/CP
    Replies: 1
    Last Post: 2008-03-25, 07:18
  4. How to check current default language ?
    By akchaudhury in forum Mobile Java General
    Replies: 3
    Last Post: 2007-01-03, 13:25
  5. Changing language of default CBA texts?
    By antijn in forum Symbian User Interface
    Replies: 7
    Last Post: 2005-04-07, 15:49

Posting Permissions

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