Multilanguage app

Discussion in 'iOS Development' started by ipodgreatmaster, May 2, 2009.

  1. ipodgreatmaster

    ipodgreatmaster Member

    Joined:
    Feb 20, 2008
    Messages:
    186
    Likes Received:
    0
    Device:
    4G iPod touch
    I searched everywere and i havent found anything helpfull.

    I made an app ready for the app store and want it to be multilingual. (english and spanish). I only know that i have to do something with folders. Someone can teach me how to do this. In this moment my app is in english

    Thanks
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    You need to use .lproj folders. In there, include a strings file with all the strings you want to localize. In your app use localizable NSStrings.
  3. centroid

    centroid New Member

    Joined:
    Nov 12, 2007
    Messages:
    405
    Likes Received:
    0
    Device:
    iPad 2 (Black)
    Thanks. Something I also needed some clarification on.
  4. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    Look at the NSString header in the Foundation framework. Here are a couple of methods I found just cmd+f'ing:

    Code:
    - (NSComparisonResult)localizedCompare:(NSString *)string;
    - (NSComparisonResult)localizedCaseInsensitiveCompare:(NSString *)string;
    + (NSString *)localizedNameOfStringEncoding:(NSStringEncoding)encoding;
    + (id)localizedStringWithFormat:(NSString *)format, ...;
    
    NSBundle Header:
    Code:
    NSString *NSLocalizedString(NSString *key, NSString *comment)
  5. haqu

    haqu New Member

    Joined:
    May 15, 2008
    Messages:
    39
    Likes Received:
    2
    Device:
    iPhone 3G (Black)
    ipodgreatmaster,

    Yes, you should create 2 folders -- en.lproj and es.lproj
    Here is a good article: http://go2.st/53

Share This Page