Arabic translation for iPhone - iphone

What localization prefix do I use for an Arabic translation of the text for an iPhone application? For example for a French translation I use the prefix "fr" which creates a directory "fr.lproj". In actuality the lproj prefixes are the two letter country codes for the country. But there isn't a country for Arabic. So what localization prefix do I use for an Arabic translation?

I don't know about the iPhone specifically, but for Arabic it is typical to use "ar" as the prefix. If there are specific subsets, it has the form of "ar-XXX" but don't know what the possible XXXs are.
Generally, it is good to follow one of the ISO standards, I am guessing that if you use fr then you need ISO 639-1 and not 639-2. See this link.

BCP 47 definition for Arabic:
Type: language
Subtag: ar
Description: Arabic
Added: 2005-10-16
Suppress-Script: Arab
Scope: macrolanguage
Also here's a list of the Languages abbreviations in ISO 639-2 format:
ISO 639-2 language codes
I hope it helps.

Related

What Unicode Ranges are used exclusively by Simplified Chinese, Traditional Chinese, Korean, and Japanese?

I need to create packages that contain Unicode characters used only by a specified language. A key requirement for these packages is to make them as small as possible (thus why each package only contains the characters used for its language).
The problem is I can't find a single resource online that specifies the ranges ONLY for a certain language, such as ranges X1-X2, Y3-Y8, etc for Simplified Chinese. Instead everywhere tells me to use CJK (U+4E00 - U+9FFF). I'd like to know which parts of CJK are used for each of the below languages.
I understand that many characters in Asian languages are considered obsolete/unused. Thus they should be excluded from the ranges. The ranges should only include characters used to communicate. I hope that's clear haha..
That being said, the languages I'm try to make these packages for are:
Simplified Chinese
Traditional Chinese
Korean
Japanese
Does anyone know the exclusive ranges for these languages or how to find them out?

Japanese and Chinese first/last name detector

Given two Unicode strings encoding a first and last name (in Japanese or Chinese), what would be the best approach to tell if the first/last name belongs is Chinese or Japanese?
For example, is it possible to tell if the following are Chinese or Japanese names?
任天堂
金城武
唐泽西
白川轩
竹中宇
叶山明
林慧梦
No, it is impossible to tell the language of a string from just its raw character content alone.

antlr4 and international characters

I have been using antlr4 to parse a German document and so far I have done the following to parse the text that includes German characters:
LETTERS:
[a-zA-Z_\u00DC\u00FC\u00D6\u00F6\u00C4\u00E4\u00DF]; // hex unicodes for ÜüÖöÄäß
what is the best way to describe lingual characters of all languages in Unicode in a way that antlr understands, without specifying each language/character individually? say, the french, Arabic, or Chinese, Japanese characters?
Thank you
The best way is to use character ranges corresponding to the desired Unicode classes. Even then, the result can be a bit clumsy. See this worked example.
The raw data available in the Unicode standard's Appendix tables can be stripped and munged into a usable format with just a bit too much effort. ;)

lang = 5 letters for Apple's Search API, am I missing something?

Apple's search API documents specify:
lang =
The language, English or Japanese, you want to use when returning search results. Specify the language using the five-letter codename. For example: en_us.
The default is en_us (English).
examples: en_us, ja_jp
However, I cannot find this 5 letter standard codename. Are they just expecting a ISO 639-1 Code concatenated with a 2 letter country code?
Has anybody ran into this issue before?
As you can see the document below, en_us, ja_jp is not a "example" but the supported values for lang parameter key.
https://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
This means, currently this api supports only these two langeages.
Hope this helps.

How to convert punjabi unicode to English Text?

I have records saved in SQL SERVER database in form of punjabi unicode. Now i want to convert these punjabi unicode to English Text. Is there any utility which can help me? Please reply if anyone have solution paid/free. Thanks in advance.
The question is nonsensical -- in the sense that it makes no sense.
Unicode is not a language. It merely provides a mapping from characters (more precisely, glyphs) to a binary code, in such a way that text in a font using Punjabi characters will stay that way when another font is applied. There is no "English" Unicode, and no "Punjabi" Unicode either.
You can only 'translate' from Punjabi to English using translating software. (Given the current state of automatic translation software, you are better off with a human who is fluent in both languages.)
If you wants to change Punjabi Unicode converted into English Text as example
ਨਿੱਕੀ ਕਹਾਣੀ (unicode)
in`kI khwxI (Converted into Gurmukhi Lipi, shows as English ! When you change its font into GurmukhiLipi it shows in punjabi)
You can check my website, previously in UNICODE and now in GURBANI LIPI (I have installed a plugin to convert English Letters as Punjabi)