Askar Hussain
Askar Hussain

Reputation: 123

Localization and how to handle web content on an iOS app

Let's say if I have some content coming from a web service that's in English (en-US). Now, to go with localization what's the best way to localize this content?

I kind was leaning towards having the web service spit out localized content but that wouldn't be ideal on a hindsight.

Anyone knows what's the best way to get these contents localized and out to an iOS app?

Upvotes: 0

Views: 406

Answers (2)

Taimour Tanveer
Taimour Tanveer

Reputation: 408

You should use the web service to supply the localized content. If it is troublesome to populate localized data then you should probably use some translation service Try google translate API for this purpose https://developers.google.com/translate/

Upvotes: 1

DarkLeafyGreen
DarkLeafyGreen

Reputation: 70436

Get current locale:

NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];

When loading you web content, pass the locale identifier to your request. On server side generate localized response based on the identifier.

Upvotes: 1

Related Questions