How to specify DatePickerDialog locale? - android

I am developing an application on Android. The application has a layout to select a lenguage to use: spanish, portuguese, english, french, italian, german and galician. It works fine but when selected locale is galician, DatePicker dialog is in english. I think that it´s because Android don´t have galician language, how can I change DatePicker dialog to show data in correct locale?
Thanks in advance,

I think you have to extend the DatePickerDialog class with your own and set the text in galician.

Related

how to prevent android material date range picker changing locale?

Material date range picker changes locale to Arabic when the app locale changes. I want to prevent this and always shows the default as English. how can i achieve this

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?
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">
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.

Copy/paste dialog in android showing only english for both english and spanish layout language change

I am using English,Arabic,Farsi and spanish language layouts.
If I'm in English layout the dialog shows in English like copy/paste thats good.
When I change it to Spanish then also the dialog showing copy/paste.
Same for Arabic and Farsi both showing copy/paste dialog in Arabic.
How to change copy/paste dialog with multiple languages?
You dont need to have a lot of layouts to have different languages, just edit your Strings values into res - Strings , you can create more than one String for different texts, and then programatically with your layout you can change the language depending on the phone and people location
See this : https://developer.android.com/training/basics/supporting-devices/languages.html
ps: with the same string id, you can have more than one language, the phone will choose in which language it pulls the text from Strings.xml

Android app in three languages

I wanna create my android app in three languages. English & Punjabi & Gujarai.
"Gujarati" & "Punjabi" is not available in locale list of languages. so i can't able to create values folder like values-fr(french) and value-rs(russia).. like dat.. How can i develop this app with "Punjabi" & "Gujarati"?
Thanks & Regards,
Jay Patel
Gujarati fonts
Punjabi fonts
The above links has fonts for Gujarati and Punjabi language
and u need to add this in assets folder and u need to use TypeFace
class to set that font
see list of supported locale from following Url
http://www.science.co.il/language/locale-codes.asp
U can support Gujarati just add gu-rIN folder in values folder.
If Android doesn't offer the language choices, you'll have to implement your own language toolkits: a translation framework and a menu where a user can change the language.

Need edit command in android edit text in danish language

Am doing a danish project, so when i long press in the edit text box i need the "Edit", "copy", "paste" etc commands in danish. In my phone there is no danish language can be selected.
any help is appreciated.
thanks in advance....
jibysthomas
I think you have to use Typeface for using Danish language without selecting Danish language from your phone language.
And for long press dialog I think you have to make your custom dialog and use that. I am not sure but this is my idea.
Thanks.
I use "Scandinavian keyboard " and when i need it press and hold the input box and change the "input method" to this keyboard
https://play.google.com/store/apps/details?id=com.android.inputmethod.norwegian&hl=es
hope it works 4 you
Your Android build must support each localization for the system menus to appear in the desired language. Yes it is possible to support a language by overriding the system menus but if you use Danish as your default language in the app and the system language is set to Danish the system menus will appear in Danish.
Download a custom locale app from the market and use it to change your phone locale to Danish. In your app, you then need to support localization. Read this document on localization. It helped me a lot when I was localizing an app. Briefly, you will need to create a "values-da" folder under res, create strings.xml and define the strings you need with your Danish values. Don't forget that you need to have a strings.xml file in your regular "values" folder as well with all the strings defined. This folder represents the default string values, and is useful to fall back on if a string is not found in your "values-da" folder.
Trust me, the whole process is actually a lot easier than it sounds.

Categories

Resources