Raja Sankar
Raja Sankar

Reputation: 39

Using Multi language localization (Arabic, English)

Using Multi language(Arabic,English) in Application. If we set Arabic language as language in the app.For Numbers,Text view showing Arabic number.I want English numbers not Arabic number even if we selected English language.how to show number in English even if language is in Arabic?

Upvotes: 0

Views: 705

Answers (2)

Elsunhoty
Elsunhoty

Reputation: 1627

Ok

Just Try to put Your string and Numbers In formatted String and use this

something like this

<string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>

and then

<resources xmlns:tools="schemas.android.com/tools"; tools:locale="en"> 

Upvotes: 2

Megha Maniar
Megha Maniar

Reputation: 444

By default numbers are displayed in English only, unless you format the string, but it is not a good practice to use digits in English while using language that supports RTL specification. Please refer this: https://developer.android.com/training/basics/supporting-devices/languages.html#FormatNumbers It seems that you are changing language from device setting, please try changing language within the app, changing language from device setting will display numbers in that language.

Upvotes: 1

Related Questions