Non-alphanumeric Characters sets not working - swift

I'm working to localize an app. I have my english xliff file that was translated. When I import the es.xliff (spanish) I get Localizable.strings (Spanish) and I can flip the app to Spanish, same with French.
For some reason with languages like Korean and Arabic ko.xliff and ar.xliff this is not working and I not getting a Localizable.strings file for this languages.
Any ideas?

The answer is to have the files in separate folders and choose them individually.

Related

Is there any way that automate the localizations translations of my app's .arb file

I have an app_en.arb file which contains my localization translation for the English language.
I want to generate other languages's localization files based on this one, and I want to know if there are some software/services that might accelerate this process such as auto-translation, listing those translations for editing them...
Thanks.

iOS localization. Aim to localize strings in all languages, but images in only some languages

I'd like to localize my application with the following pattern:
Localize all strings (say English, French and German (don't mention the war!))
Localize some images in some languages (say just English and French)
I can localize the strings without issue. My problem is that when I add the German strings, the other resources that are localized into English and French attempt to find a German version. I don't want to provide a German version (trying to avoid too many superfluous images as they bulk up the size of the app).
Can anyone suggest a way of telling the application not to bother looking for a German version of the images.
My problem isn't adding languages, it's ignoring them under certain conditions. I don't want to include a German version of "a.png", but I do want to include a French version of "a.png". When the user's language is set to German, I'd like it to select the default language which is English.
Having had the same issue I want to follow up on this as the suggested resolution did not work exactly as quoted.
My setup is 3 localized languages, de, en, fr. The .lproj folders Xcode created are thus named
en.lproj
de.lproj
fr.lproj
I have a graphical button with "start" on it that needs localization from english to french but not to german (as it is the same word).
My "Localization native development region" was set to "English", which must have been the default (maybe a while back, the project has been a wip for quite a while).
The button did not show up on german devices. Switching to "EN" or any of the suggestions from Xcode ("United Kingdom", "United States of America") did not resolve the issue.
The solution was simpel. The string in the "Localization native development region" needs to exactly match the (native language).lproj string. So setting it to "en" it finally resolved the issue.
Hope this helps whoever stumbles upon this question.
iOS (and Mac OS) should always fall back to the app's default language. If you don't include the image.png in the de.lproj resources folder, the app should use the en.lproj/image.png file in its place.
Look for key: "Localization native development region" in the Target > Info pane of Xcode. Make sure that says EN.
I don't have that much experience but as far as I'm concerned, your program should just look for the german image, find nothing and then try to load the english image instead.

about iOS localization

In the following doc:
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html
it's mentioned that
In iOS, the bundle interfaces do not take dialect or script information
into account when looking for
localized resources; only the language
designator code is considered.
Therefore if your project includes
language-specific project directories
with both a language and region
designator, those directories are
ignored. The bundle interfaces in Mac
OS X do support region designators in
language-specific project
directories.
I don't quite understand this. Does it mean that the name of .lproj directory cannot contain any region code?
But at least I know that iOS accepts zh_TW.lproj, zh_CN.lproj. How about en_GB.lproj and en-GB_GB.lproj? Or it only knows en.lproj?
This simply means that iOS would support only two digit language codes (e.g. en.lproj, es.lproj etc.). Whereas Mac OS X will support the format Language_Region (e.g. en_GB, en_US etc.).
I think that information is outdated. They must not have updated the Mac development docs when the iOS changes were made.
When you're creating your Localizable.strings or Project.plist file, you will create one per language or language-dialect. Just create the ones you need.
If you're using Xcode 4, be sure to show the "Utilities" (View-->Utilities-->Show Utilities) when the Localizable.strings or Project.plist file is selected. It will have a Localization section that makes adding these easy.
UPDATE: As of iOS 8 you can now use any language or region in iOS.
Apophenia is correct. Although iOS has 30 languages that it will recognize as .lproj folders, it won't accept any regional codes, so telling it fr-CA won't get you French Canadian, but rather will simply use your French or English strings. The only exception to this rule is Chinese, which should be zh-Hans for Simplified Chinese and zh-Hant for Traditional Chinese.
You should always use the two-letter code for the language (en.lproj, fr.lproj, es.lproj, de.lproj, and so on).
There is a complete (and updated) list of the current supported languages and language codes for both iOS and iTunes here:
http://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html
Note that the iTunes App Store has a different list of supported languages, which makes the chart linked to above very handy!

iPhone: localization / internationalization default strings file

I currently have two supported languages: English and Spanish. Thus I have two main.strings files for each language. One in en.lproj and one in es.lproj.
What I want now is that the English main.strings is the default file if a user with a locale other than en or es arrives at the application, e.g. de or fr.
I know I can set it manually for each string in the code with the defaultString parameter:
NSLocalizedStringWithDefaultValue(key, #"main",[NSBundle mainBundle], defaultString, comment);
But I would prefer to not enter it there again (and have to change it at two places), but rather have the en main.strings file as a default for any other "unsupported" locale.
What I want now is that the English
main.strings is the default file if a
user with a locale other than en or es
arrives at the application, e.g. de or
fr.
Did you try that? I’m almost certain the application will fall back to the English locale without you doing anything at all. Even the system dialogs will come up in English unless your application explicitly supports the current locale.
If you want to avoid this long syntax, I have another solution posted here
Localizing strings in iOS: default (fallback) language?

iPhone Localization Korean, Japanese Codes

How do I find the localization codes for Korean, Japanese, German?
I want to localise my app in these languages. Does it matter what code I use in Xcode?
When I add a new localizable.strings file? There's an option "Add new Localisation". Korean & Japanese are not listed. Does Xcode need a specific localization code for it to work?
Actually, Japanese is "ja" not "jp"
I originally made this mistake as well.
You may find this list helpful for finding country codes:
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
For German use: de
For Japanese use: jp
For Korean use: ko
You can create the ".lproj" folders manually and then add the files from those folders by dragging them to the resource group in XCode.