Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
Hi,

I have created a application for storage and backup. I used English as native language and developed it. Now I want to make my application Internationalize by adding localization to my application. Everything is fine. But I am able to create localization only in 3 other languages apart from English. The other 3 languages are Japanese, French and German.

Procedure I am following is :
1. Select the "nib" and open the of the project (File->GetInfo)
2. Select "General" tab, and click "Add Localization" button on the bottom left.
3. Select the language from the list and click Add.

That's it.

I want to know How to add other languages like Spanish, Italian etc languages for localizing my application.

Regards,
Satya.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
If you don't see the language you want, you can just type it in directly I believe.
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
What about some language names in Chinese, Japanese or Korean (i don't know exactly what language it is).......I observed the names of different languages in preferences of mac.
 

guifa

macrumors 6502
Sep 19, 2002
260
0
Auburn, AL
You can use the language codes to identiify localisations:

es = General Spanish
es_ES = Castilian Spanish
es_MX = Mexican Spanish
en = General English
en_US = American English
en_UK = British English
zh_CN = Simplified (China) Chinese
zh_TW = Traditional (Taiwan) Chinese

You can google the hundreds of other codes.
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
As said in previous comment, I am using the language codes and localized my application. For testing purpose I changed my Mac books language to French. In my project I have a directory "fr.lproj" which is related to French language.
I am running my application from Terminal/Console.
I observed the following error:

CFPropertyListCreateFromXMLData(): plist parse failed; the data is not proper UTF-8. The file name for this data could be: /Users/johnny/Library/Preferences/com.rogueamoeba.audio_hijack_server.hermes.plist
The parser will retry as in 10.2, but the problem should be corrected in the plist.


After few seconds one more error message displayed.

CFPropertyListCreateFromXMLData(): plist parse failed; the data is not proper UTF-8. The file name for this data could be:
/Users/johnny/satyam/freshcode/exe/Applications/iFolder 3.app/Contents/Resources/fr.lproj/iFolderWindow.nib/keyedobjects.nib
The parser will retry as in 10.2, but the problem should be corrected in the plist.



I am not understanding what I have to change in plist file?
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I found out the error.
All the localization files generated must be in UTF-8 format, where are my files are in some other format.

In Windows simple chinese is denoted as zh-CN, but on Mac it is zh_CN, why there is a change in language codes between windows and Mac.
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
They didn't mention the OSX version where I have to use UTF-16
Do I have to use UTF-16 irrespective of Mac OSX version ie whether it is Tiger or Leapord.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
It's a good idea to because the link above says "Strings files encoded using UTF-8 are not guaranteed to work. When in doubt, encode the file using UTF-16."
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
They didn't mention the OSX version where I have to use UTF-16
Do I have to use UTF-16 irrespective of Mac OSX version ie whether it is Tiger or Leapord.

The last update on the page kainjow linked was last updated 2005-09-08. As such, it certainly applies to tiger. It also seems that there is a difference here between "have to" and "should". You should use UTF-16, as the document states that UTF-8 is not guaranteed to work. That doesn't mean it's guaranteed not to, but it would be wise to heed the advice in the document and use UTF-16.

-Lee
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
In Windows simple chinese is denoted as zh-CN, but on Mac it is zh_CN, why there is a change in language codes between windows and Mac.
The format zh_CN is the POSIX standard used in *nix - Windows is the one out.
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
Thanks for your updates so that I can change my file format.
How on Mac, How can I change the file format? Which Application I can use to save the files in UTF-16 format?

Also, on 10.4.11 NSLocale's localIdentifier for simple chines is returning zh_Hans and Taiwan chinese it is zh_Hant
What are these language codes irrespective of zh_CN and zh_TW?
 

Bakerman

macrumors member
Jan 31, 2005
62
7
Sweden
Thanks for your updates so that I can change my file format.
How on Mac, How can I change the file format? Which Application I can use to save the files in UTF-16 format?

XCode can save files in UTF-16 (use View->Text->File encoding).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.