I have tried to follow the below link to achieve localization .
Tutorial
It seems not working ( only English text appears )
My requirement is to change the label/button texts etc. to be changed from English to Arabic language and vice-versa on a button click inside the App.
I have already have a translated Arabic strings available from the client so I dont have to use a translation ( import/export - xliff) . Created 2 string files for English and Arabic separately and calling it ViewDidload() event checking the User had opted for Arabic/English Version.
Please note that I'm trying load the languages dynamically when user clicks button inside my app . Not by changing the device language .
For ex:
Localizable.string ( en)
"Details" = "Details";
Localizable.string(ar)
"Details" = "التفاصيل " ;
retrieval:
btnDetail.setTitle(NSLocalizedString("Details", comment: "More Details"), forState: .Normal)
But its showing only english but not Arabic when I call in buttonclick event to change to Arabic.
Please help. I m new to IOS and Swift.
Related
i have any problems with ngx.translate on IOS.
On android device all function perfectly but on IOS ngx-traslate not work.
In the main view i can choose the language, if i choose "fr" i set "fr" in db and then i take the value from db and use : this.translate.use(lng);
In db i change correctly the value, indeed the json that i download (in other views) is with the right language, but the variable on html code {{ 'MONTH.JENUARY' | translate }} it don't take the value.
Why on ios not work?
I tried to update ngx-translate, i tried to use ionViewWillEnter, but I don't understand because it works on android and not on ios
can someone help me?
Using the "Printing" project from the "Windows-universal-samples-master" examples on GitHub... scenario 4 is showing:
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges);
printTask.Options.PageRangeOptions.AllowCurrentPage = true;
printTask.Options.PageRangeOptions.AllowAllPages = true;
printTask.Options.PageRangeOptions.AllowCustomSetOfPages = true;
My question is how do you localize these settings of the print dialog?
I did set my primary language to French in Control Panel but the print dialog still shows the options in English ("All pages", "Custom range", "Page range"...).
Setting the Preferred language to French was not sufficient, you need set the Windows display language as France as well.
I added a Localizable.strings to my project, but its not working... Here is a sample:
NSLog(#"Welcome Text: %#", NSLocalizedString(#"WelcomeKey", #""));
The Localizable.strings:
Localizable.strings // DE
"WelcomeKey" = "Willkommen!";
and
Localizable.strings // EN
"WelcomeKey" = "Welcome!";
The Localization native development region is en
The NSLog in console is:
2013-05-11 04:45:49.552 App[13752:907] Welcome Text: WelcomeKey
Any ideas what's wrong ?
The localization from the Storyboard is working.
Codierung of both files are UTF-16
Have you added a strings file to store the localized text. Click File > New > New File.
This link will be helpful to you. Please check this localizable strings.
I found this answer maybe helpful to you:
Select the localized storyboard eg. Chinese (Simplified)
In File Inspector, toggle from “Localizable Strings” to “Interface Builder Cocoa Touch Storyboard”. This will retain the strings you already had, so you don’t have to worry.
Now, change it back to “Localizable Strings”, and things should be updated!
Here to view original tutorial
I want to test localization in Indian language in Android.
Following is the file string.xml in values folder
<string name="app_name">नमस्ते</string>
<string name="text_a">परिक्षण</string>
I am using AndroidHindi.ttf font.
I want to display the particular text in hindi in adnroid , but while running I am getting unrendered text .
which particular library should I include to display it properly.
you must download your language font file(.ttf) and put in asset folder.
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Akshar.ttf");
TextView tv = (TextView) findViewById(R.id.CustomFontText);
tv.setTypeface(tf);
tv.setText("Seasonal messages like welcome (நல்வரவு) is used in Kolam. Volunteering to draw kolam at temple is sometimes done when a devotee's");
Source
I am totally new to Android development , recently i bought Lynda.com Android App Development video learning course.
I am facing following problem:
Created new project
Created new xml file with text field only
Then go to Main.xml(that was created by defualt) and replace the default text field with button.
Then go to Main.Java and try calling added button by code "Button b = (Button) findViewById(android.R.id.button1);"
After that I tried to call the setOnClickListner function by " b. " but there is no option with
name of setOnClickListner.
I follow the exact steps as told by tutor in videos .. I am using Android SDK 12 ,Eclipse Indigo and working on Gingerbread 2.3.3. Any solution in this regard would be appreciated
Possible situations:
Make sure you imported android.widget.Button
"Button b = (Button) findViewById(android.R.id.button1);"
Usually it is called:
"Button b = (Button) findViewById(R.id.button1);"
if you have defined the button correctly in the main.xml file. Also make sure you are not importing android.R
I suppose it is a typo but it is actually written setOnClickListener()
Cheers