Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 11, 2007, 06:27 AM   #1
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
Localization of Mac Applications

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.
satyam90 is offline   0 Reply With Quote
Old Dec 11, 2007, 07:00 AM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
If you don't see the language you want, you can just type it in directly I believe.
kainjow is offline   0 Reply With Quote
Old Dec 11, 2007, 10:15 PM   #3
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
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.
satyam90 is offline   0 Reply With Quote
Old Dec 12, 2007, 12:59 AM   #4
guifa
macrumors 6502
 
Join Date: Sep 2002
Location: 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.
guifa is offline   0 Reply With Quote
Old Sep 24, 2008, 12:37 AM   #5
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
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 is offline   0 Reply With Quote
Old Sep 30, 2008, 01:25 AM   #6
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
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 is offline   0 Reply With Quote
Old Sep 30, 2008, 02:08 AM   #7
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Strings files should be in UTF-16 actually. See Strings Files.
kainjow is offline   0 Reply With Quote
Old Sep 30, 2008, 02:45 AM   #8
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
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.
satyam90 is offline   0 Reply With Quote
Old Sep 30, 2008, 10:37 AM   #9
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
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."
kainjow is offline   0 Reply With Quote
Old Sep 30, 2008, 11:09 AM   #10
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Quote:
Originally Posted by satyam90 View Post
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
lee1210 is offline   0 Reply With Quote
Old Sep 30, 2008, 11:32 AM   #11
plinden
macrumors 68040
 
plinden's Avatar
 
Join Date: Apr 2004
Quote:
Originally Posted by satyam90 View Post
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.
plinden is offline   0 Reply With Quote
Old Oct 1, 2008, 03:33 AM   #12
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
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?
satyam90 is offline   0 Reply With Quote
Old Oct 1, 2008, 04:53 AM   #13
Bakerman
macrumors member
 
Join Date: Jan 2005
Location: Sweden
Quote:
Originally Posted by satyam90 View Post
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).
Bakerman is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Useful tweaks/applications for your Mac? cathyy OS X 3 Nov 28, 2013 05:46 PM
windows applications mac can't do? truelies MacBook Pro 21 Nov 1, 2013 07:49 AM
Vocabulist: simple localization for OSX/iOS application gonzoua Mac Applications and Mac App Store 1 Sep 29, 2013 03:18 PM
NSAttributesString - localization? dantastic iPhone/iPad Programming 2 Sep 13, 2013 03:21 AM
Siri Canadian localization possible now without ios 6? fuzion11 Jailbreaks and iOS Hacks 4 Jun 14, 2012 10:27 AM

Forum Jump

All times are GMT -5. The time now is 09:56 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC