I am looking for some insignts, is Clang localized? I mean error messages, hints, warnings, some other output, can they be displayed in the language other than english? If yes, how to achieve that? Changing system locale or parameter switch or download localized copy?
In particular I am looking for Russian and Chinese languages,
Short asnwer: Not yet. But maybe later.
Related
I couldn't find any similar questions, so here we go:
I am working on an iOS app that for the first release will only be in french, but we plan to release an english version as well in the future. At this point, I thought it was a good idea to use NSLocalizedString for all the text, so that the app will be ready when the english language will be required. However, I would really like to use english as the key value in my code:
aString = NSLocalizedString(#"Yes", #"Text for positive answer");
instead of
aString = NSLocalizedString(#"Oui", #"Text for positive answer");
Then I want to run genstrings, and localize the .strings file in french (and give it to the translators). But if I do it like that, how can I get rid of the "original" english .strings file? Am I totally wrong here, and do I have to use french for now in my code?
If you are developing the app in English and localizing it into French, I wonder why you would want to actively prevent the app from running in English. If some users in your target market (France only, I imagine?) prefer to run their iOS device in English language, why deny them their preferred language? Or is it because you won't be doing QA of the English version and therefore don't wish to expose it yet?
In any case, I believe that you can restrict the list of supported languages by simply editing your project metadata. In XCode the list of supporting languages is shown on this page -- simply remove English and I believe that your English localizations, even if they are present in your project, won't be used (I haven't tested this but I doubt it would delete your existing English files, it should just remove them from the application's supported languages list)
You can do your whole project in english, keep english words for keys in the localizable.strings files, but keep only the fr.lproj folder, and in the plist set the supported languages only to french.
Is there any other way to localize iPhone apps beside the use of Localizable.strings? Can I use Google Translate or something like that?
I have my application written in English, and I have created Localizable.strings files for about twenty languages. I have the English Localizable.strings working perfectly, and I have tried Italian as well. Is there any way to translate these Localizable.strings to the rest of the languages automatically?
I mean is there any program or something to do the job for me?
In short: No, there is no program for that. It's the same problem as translating any text: You need to understand the meaning to give useful translations.
As a quick fix, you can of course simply take the strings in your Localizable.strings file and copy them into a Spreadsheet, then run one column through Google Translate and copy the result back. Then reverse the procedure and you have a translated Localizable.strings. A regex for doing this would be:
^"(.*)"\s*=\s*"(.*)";$
that works fine in eg. TextWranger with grep mode on, then you can replace the text with
\1\t\2
to create a the tab-delimited file from a strings file.
I still suggest you invest in a native speaker of each language to double-check the translations, or your app will become a laughing stock. Google Translate just can't replace a real human yet...
To localize your app you can use Localizable.strings or use localized XIB.
I don't use the second approach because it is more cumbersome to manage.
With Localizable.strings you have to code a little bit more but I prefere it.
To translate I think you can use google translate (I do that) and build the file for each language.
If you want to use an online translator, remember that it can be not always available and your user must be connected all the time.
So my advice is to build all the language files since they are managed by the OS and you will have a more reliable solution.
You should create Localizable.strings for each language and translate them with any translation tool
I'm building an iPad app for a German customer. The app is not planned to support any languages other than German so I didn't use any of Xcode's localization functionality but simply hard coded the strings.
My problem is the following: The entire app now is in German except for the system messages that (I suspect) come from iOS itself like copy, paste, cut in a text field. This happens in spite of the language of iOS being set to German in the system preferences. I always thought the handling of that was entirely up to the user so that he would see those kinds of messages in whatever language he chose in the system preferences. Apparently that's not the case.
Can anyone give me a hint what I need to change in order to have those messages displayed in German?
TIA!
Are the clang C compiler's diagnostic messages (warning, errors, etc.) hard-coded, or does it provide a way to specify which language (as opposed to English) to emit them in? Could I provide a custom dictionary for it to use at runtime, without building my own clang from source?
Clang's diagnostics are currently hard-coded, but the system is designed to support localization. You can read some information about how it works here:
http://clang.llvm.org/docs/InternalsManual.html#Diagnostics
We'd really like help localizing. If this is an area that you're interested in helping out, please contact the cfe-dev mailing list!
I'd like to essentially create a uilabel with chinese on it. Do I need a unicode font for this, and is there a system font I can use on the iPad? Assuming so, would I need to look up the escape character to denote it if I wanted to simply hardcode it, ie use the \u type of notation? Please assume I'm pretty clueless about unicode, as this question probably implies.
For a global product/system like this, unicode support is a very basic requirement. iOS device support it natively, including unicode fonts and codepages. No extra effort on this is needed.
For unicode string literals used in source files(I assume XCode here also), I haven't try yet, but my coworkers seems have no problem with it.
Some google results on this you can refer:
http://www.cocoabuilder.com/archive/cocoa/97208-cant-use-utf-8-source-files-false-string-interpretation.html
http://www.cocoabuilder.com/archive/cocoa/224023-unicode-in-constant-nsstrings.html