How to check iPhone language settings?

I localize my application, which is cocos2d, so there are no nib files, I localize a shortcut which is good, but you want to check the device language to set the exact font and font size for each language. In short, I want to do it like this:

If (device.language == en) {
Set font to "fontname" and "fontsize" to x;
} else {
set it to "another font name" and font size to y;
}

How to check that the language / device settings are set to the exact language?

+2
source share
1 answer

You can use:

[[NSLocale preferredLanguages] objectAtIndex:0]

This will return a language tag like "en" or "ja".

+5
source

All Articles