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.
Related
I have made an application in android but now I have to provide arabic language support. I have checked many of answers in stackoverflow but from any answer I didn't get correct answer.
To provide localization support for different languages, we need to add the language specific resources into separate folder. For eg:Inorder to provide layouts for Arabic language
we need to create a separate folder under res folder i.e.,res/layout-ar like this.
In order to access the current language via code we can get the current language by calling
Locale.getDefault().getDisplayLanguage();
for more information look into following links:
for localization :http://developer.android.com/guide/topics/resources/localization.html
for RTL layout mirroring (Arabic like languages):http://android-developers.blogspot.de/2013/03/native-rtl-support-in-android-42.html
Also you may need to use 'onConfigChange' to your 'AndroidManifest' file with option 'locale'
I am just a beginner but I have looked this question up and came up with this:
http://marketplace.eclipse.org/content/android-string-localization#.VG5A_PmUeSp
Eclipse provides string localization. However, when it translated the strings to Arabic, I had to double check the translation because Arabic has Feminism in Grammar and also some plural forms aren't that correct.
In AndroidManifest.xml:
SupportRtL
this will enable alignments of images and text to right in Arabic and left in English
Create two string resource layouts (one English, one Arabic)
string Resource
Add the same string with the same name in the two layouts but change the value of the arabic string in the (ar\strings.xml)
Same goes to each drawable item
(Also for reference I'll add how you can create a resource that ar or RL)
creating arabic resourse
Also either in the base activity to set the base local language
app = (MyApplication)getApplicationContext();
lang = Actions.setLocal(this);using the function:
function
can I change the referring a resource folders programmaticaly. I need to use a language that is not supported by android, in my case Sinhala. can I create a values_sin folder and refer it when user select Sinhala language. can I change the font together with that for entire application.
How about this: put your Sinhala strings in res/values/strings.xml, and the English strings in res/values-en/strings.xml or maybe even better, in res/values-en-rIN/strings.xml. When using the second method, your app will be in English only if the user selects "English (India)" as the phone's language. In any other case, the default resources will be used - which in your case will be in Sinhala!
Edit 2: actually, Android does support Sinhalese, using res/values-si. If you can't select Sinhalese as your device's default language, you could change it at runtime. There are plenty of posts already, such as Changing Locale within the app itself
Let me specify the problem first.
My app is designed for text mainly in Hindi, and I want to target Android OS below 4.1, which doesn't support hindi characters(yes, I've tried various Hindi fonts, which don't work properly, or the desired outcome is not the expected one).
So, I've prepared icons with hindi text, and all works perfectly fine now.
The problem left with is, how can I specify hindi text for the launcher icon?
I've tried to specify hindi text by creating an image with hindi text, and left the application:label ="" and activity:label="" blank.
But the text doesn't appear in where the app name should have appeared, or apparently I didn't create the image correctly.
Any help in this regard would be appreciated :)
I hope you already have tried Krutidev (Hindi Font), if not you can try it.
Though it may late to answer now, but as i read this now, i would like to answer since I did the same in my application in the following way:
1. Just in application tag of your app's manifest, give app name as normal:
android:label="#string/app_name"
2. in resource file strings.xml, add a string 'app_name' with the name your want for your app. Be careful, what i did was: i typed the text using Google transliteration and i gave this in Hindi.
3. Then when you save your strings.xml, it will ask you to save this in proper encoding, then choose 'utf-8', and that's it.
In my app,i have used 'locale' to change language hindi in programatically.and i also used .ttf file to convert title of app sub page in hindi language.but when i change language ,the other control change language automatically..for ex,datepicker etc,
when i have to set value in textview directly,its value can't be converted in hindi .but when i have some changes regarding that value and after set value in textview,then it will convert hindi language automaetically.please give me some solution of this.
Thank you.
I can tell you from my own experiences that it will result in strange behaviour when changing the language "manually". It is not recommended. Sometimes even changing the device orientation will overwrite your changes due to the changed configuration. Just be aware that this approach is not supported or intended by Android.
You can use strings in this way: " R.string.*" or in xml: "android:text=#strings/*" - right?
They all take their values out of a fixed file named strings where you put them all in right?
Let's say I have an app where there is the possibility to change language. Is there a way in which I can change that string file? Let's say have a strings file for English and strings for French or anything.. so i can still use the R.string.* and #string/* but I will get different values depends on the user choice?
The Developer's Guide on Localization covers this.
In short use the same string names, but have different locale folders, like:
res/values/strings.xml for the default language
res/values-fr/strings.xml for French
res/values-ja/strings.xml for Japanese
The OS will load the appropriate language for R.string.hello for you.