iOS secondary language localization - iphone

I properly set localization for es (Spanish), en (English) and ca (Catalan). Spanish and English are primary while the secondaries are like es-xx and en-xx. Catalan is a secondary that has es-ca code.
Problem is that if I launch the app for example with en-us, en.lproj resources are called because en-us does not exist. Good until this point but, if I remove catalan localization, should do the same and load primary one, es. However, does not load it and loads default one instead (en). I am missing anything? thank you

I'm not sure you're modeling the problem the right way.
The problem with removing Catalan (not sure why you'd remove a localization) is it will fall back to Spanish correct? I assume people in Barcelona and who speak Catalan also speak Spanish but it doesn't feel right to change the language on those users.
In my app I offer English (both UK, US), French, Japanese and Spanish. At startup I get the user's preferred locale and use an NSDictionary to map them to the most appropriate match and if no match is found I fallback to US English. For instance if you live in South Africa the closest English is UK English but if you live in the Philippines US English is more appropriate.
Catalan users will fallback to English unfortunately but in the next version I'll be letting users specify their preferred language from the supported language list as well so they can fallback to Spanish in the future.
Try using NSDictionary to map the user's locale to your app's available languages and see if it solves your issue. Hope this helps!

Related

How to set up multiple languages in Typo3 correctly?

this may be a noob question - but I hope to get an answer from an experienced person,
because we have to switch our settings and would like to do it correctly the first time.
At the moment the default language is set to German. English is defined as another language.
When somebody from France looks at the website, it is shown in German first, he then has to switch to english manually. For an english visitor everything is fine.
So what should we do:
1) Set the default language to english and have german as second language? What about guys from Switzerland, Luxemburg, Liechtenstein and Austria then. Do these have to be defined seperately as they are also seperately selectable as windows languages?
2) Is there an option to simply say: Every visitor that is not german speaking should get the english website in default? And even in this case, will this then recognize the different german options explained in 1?
Sorry if these questions are stupid. ;-)
Thank you,
Fabian
Your aim is to change how visitors see the website, but your are asking how to change the editing of the website accordingly. Luckily it is a CMS and you can separate those concerns.
What you seem to look after is a component that analyses the IP/language/browser properties of the visitor at first page load and that there are rules what to show (e.g. show English version except your mentioned countries). There are extensions for that specific purpose like https://extensions.typo3.org/extension/locate or others: https://extensions.typo3.org/?L=0&id=1&tx_solr%5Bq%5D=language
That way you don't need to change the default at all.

Moodle login page language change

In my moodle site english and chinese are enabled. The rest of site changes to chinese when language is changed, but the login page does not change. Can anyone guide me ? Please help.
You should be able to set the default here
yourwebsite.com/admin/settings.php?section=langsettings
Or put this in config.php
$CFG->lang='yourlangcode';
In Site Administration => Language => Language Settings:
Turn off Auto detection
Set language to Chinese
Important: The server where your Moodle is hosted may be in english. If you cant change it to chinese, you may have to set the Locale field to one of these:
ISO-2022-CN (Simplified Chinese)
ISO-2022-TW (Traditional Chinese)
BIG5 (Traditional Chinese in BIG5)
GB2312 (Simplified Chinese in EUC)
And also the config.php setting as Russel said:
$CFG->lang='yourlangcode';
Please let us know if it worked!
HTH!

How to find the official international country code for localization with iPhone app?

I want to localize my app , and I didn't find that the official international code for it. and I found the Korean is ko, is it right? and what are other codes? and the English is en-GB, is it right ? what means about GB, and when I localize my app , I add the en.lporj or en-GB.lproj? Thank you very much!
Correct, Korean is "ko". Full list of language codes. You may be able to append a country code to the language code for resources that are specific to a country. Such as "en_GB" or "fr_CA".
Please review the Language and Locale Designations document.
English is international "en". "en_GB" is for English in Great Britain. It's best to create an en.lproj that contains your international English. If you choose to add GB specific spellings such as "Colour" instead of "Color", add them to en_GB.lproj.
A nice easy list can be found on Applingua's DevZone blog:

iphone, localization, info.plist

If I declare "Japanese, French, German, Simplified Chinese, Thai" in the "Localization" field of my app's myApp-info.plist file, will the iTunes Store detect this and correctly advertise these (together with the "Localization native development region" of "English") as the languages in which my app is available?
If not, what should I do to make sure these localizations are advertised?
Should I replace the "Localization" entry with comma-separated string of ISO_639-1 codes "en, fr, de, ja, th, zh-Hans"?
Thanking you in advance.
In your Info.plist, you need a "Localizations" (CFBundleLocalizations is the raw key name) entry of array type. Add all the supported languages to the array as separated items of the form "English", "German", etc. You don't need to use ISO codes.
On iTunes Connect, you will also want to localize the description of your app when you do the submission.
At the end of the document iOS User Experience - Internationalization Programming Topics it says that the words English, French, Portuguese,... are now deprecated and their ISO codes should be used instead.
(I wanted to add this as a comment to the most voted post, and that's why I registered in the first place, but apparently I don't have enough reputation to do so yet. Oh! And thank you, Julio, your answer helped me a lot. ;) )

How to handle localization of controller names?

I run a site where it is important to have good and simple URLs that need to be localized.
Example for the english version:
example.com/car/?type=fiat
Example for the Swedish version:
example.se/bil/?typ=fiat (bil is car in swedish)
And ofcourse I would like to handle all of these URLs from the same codebase. What is the best way to handle this?
Should I set up several controllers (CarController, BilController) or is there a "cleaner" way to handle localized controller names?
BR
Niklas
Don't do that. Ever.
Microsoft, a really big, powerful and resourceful company tried that with Excel. In English versions of Excel, you use IF() in formulas. In the German version, it's WENN(). In French, it's QUAND(), I think. In Japan, it's probably ば(). Now imagine someone from Japan sends me an Excel sheet ... There are two options:
"I'm sorry, I can't open this file"
Translate all names on the fly
Doing #2 seems simple enough ... until you run into a word which uses the same letters but has a different meaning in two languages. Example "see". Means "look" in English and "lake" in German. Since you don't know all the languages in the world, you have no chance to figure out which collisions you will have before it is too late.
Also, how do you know which name to use? From the language in the browser? Or do you hate your international customers who occasionally use the Swedish main site? How do you handle Asian languages? Will the URL be server/%E6%AC%80%E6/?%AD%81%E6%AB=fiat?
Don't. Do. That. Ever.
What about rewriting the URL depending on the domain? This way, the Zend framework will get only the English names, while the URL can use localized names.