Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-09-2008, 01:20 AM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default Localization: which files go where?

Apologies if this is one of those things that's obvious to Cocoa programmers, but exactly where do the localization strings files go in your xcode project to build properly? Right now I have a single folder inside my main application project folder called "languages": the layout of it is something like this:

- languages
-- de.lproj
--- Localizable.strings
-- en.lproj
--- Localizable.strings
-- es.lproj
--- Localizable.strings
-- fr.lproj
--- Localizable.strings

I added the top-level "languages" folder to my Resources folder using "Add->Existing files..." , unchecked "Copy items into destination group's folder", selected Text Encoding: Unicode (UTF-16) and clicked Add.

I find that when I switch the simulator or device language, I get somewhat random results. Some strings show up in the language I expect; often, however, they show up in French regardless of the locale settings. I've also found the behavior is pretty inconsistent between the device and the simulator.

BTW I'm consistently using NSLocalizedStringWithDefaultValue throughout my code-- the default values are in English.

Anyone else having luck with localization?
bonehead is offline   Reply With Quote
Old 05-12-2008, 10:32 PM   #2 (permalink)
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default Re: Localization: which files go where?

-Ping-

Right now my assumption is that the strange behavior I'm seeing is a bug in the iPhone-- it may simply be loading the last (alphabetically) language strings file and using that.

I'd be curious to hear if anyone else has been able to get localization to behave properly with multiple languages.
bonehead is offline   Reply With Quote
Old 05-13-2008, 12:40 AM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 802
scottiphone is on a distinguished road
Default Re: Localization: which files go where?

I fiddled around with this awhile ago but put it on the back burner.

Under localization section of the guide they recommend a different setup than you have.
Settings.bundle/
Root.plist
Root.strings
en.lproj/
Root.strings
de.lproj/
Root.strings
scottiphone is offline   Reply With Quote
Old 05-13-2008, 12:41 PM   #4 (permalink)
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default Re: Localization: which files go where?

Quote:
Originally Posted by scottiphone
Under localization section of the guide they recommend a different setup than you have.
Settings.bundle/
Root.plist
Root.strings
en.lproj/
Root.strings
de.lproj/
Root.strings
I think that's for the Settings bundle...I was following the example under the "Internationalizing Applications" section.

Anyway, I'll fiddle with this further and try to narrow down the bugs.
bonehead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read / write / create data files Xavier iPhone SDK Development 12 01-17-2011 04:02 AM
Does an app update overwrite all files? fasttech iPhone SDK Development 5 06-03-2009 04:39 AM
Localization and region format martinn iPhone SDK Development 4 06-14-2008 09:29 AM
How to save files in a build dynamically? satyanarayanagv iPhone SDK Development 0 06-10-2008 02:33 AM
zip/unzip files on iPhone , how i can do that ? abuarja iPhone SDK Development 1 05-15-2008 11:52 AM


» Advertisements
» Online Users: 318
6 members and 312 guests
Anwerbl, guusleijsten, HowEver, LEARN2MAKE, mottdog, Objective Zero
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,879
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0