Localization

Hello,

I am currently working on an iPhone Game that should be portet for different Languages.
I havent found any information how this is handled by the AppStore. Is it possible to upload different versions of the app for different Languages?
How do you handel the localization in your apps?

Thx
Reno

In response to your second question, localization (like all UI components in Unity iPhone) are a manual (read you :slight_smile: ) activity. You’ll need to download font sets for each language group, and then separate your text in one way or another (have a look here: Unity - Manual: Text assets). Of course image based text has to be unique per local as well.

Hope this helps,

Galen

You can’t upload different versions of the app for different languages without making totally separate “products”, i.e. separate App IDs, etc…

Best to include all your localization in the one executable as the fellow above said to do. Detect what language the phone is set to and away you go.

Thanks for the answers.

I cant go the way for different font-types because the text is all on textures. I hoped that different versions would be possible because now the project gets real huge if all graphic assets for all languages have to be in.

How can i detect the laguage version of the iPhone/Pod?

Or we just implement a button to switch between languages it dosnt make a difference if all assets are present.

Thx 4 Help

I’m not sure how it’s done in Unity, but this is the Objective C code to get the current language on the device:

// This gets an array of the user's preferred languages in order.
CFArrayRef localeArray = CFLocaleCopyPreferredLanguages();

// The 0th item is the language currently set.
NSString* language = [[NSString alloc] initWithString:(NSString*)CFArrayGetValueAtIndex(localeArray, 0)];
CFRelease(localeArray);

if ([language isEqual:@"ru"])
{
	// Russian
}
else if ([language isEqual:@"da"])
{
	// Danish
}
etc...

You just look for the two letter country codes.

you could mix techniques… use the object C code to determine language (or supply a pick list, then (provided you have iPhone pro) you could upload a asset bundle with the correct language (probably want to have a most likely couple bundled, and upload any others as needed).

Just a thought,

Galen

why upload it.
Its not like a few text files need a large amount of space especially after they went through Unity’s powerfull lzma compression that compresses text down to nothing size wise.

Also I potentially wouldn’t use the language there but write it in the userdefaults and read it from unity through the player prefs and then use the corresponding textassets through the WWW class accessing a local text asset.

The file size is an isue for us because the text is on images. And for performace issues we packed them into a texture atlas. So now we have 2 diferent 1024x1024 textures that have to be replaced for each language. Maybe we could manage it to get just one 1024x1024 atlas but not sure because i am just the programmer for this project.

Can you post a snippet here how you write the standard language in the userdefaults? Because I have no clue about ObjectiveC.