Blackberry Hindi and Gujarati text display - blackberry

I want to develop a blackberry application that supports multiple languages, such as English, Hindi and Gujarati. I have tried using utf-8 characters but it displays "??????" for Hindi.
I have try also i18n but there are not possible to write in Hindi in property file. have any idea.

The device needs to have the appropriate fonts installed to display different languages. So you would need to make sure Hindi fonts are available. It sounds like they aren't. Try going to a hindi web page, and see if the characters display correctly there.
For the resource bundle, which I think is what you mean by 'i18n', the compiler forces you to use the default java character encoding. If you're on Windows, this is CP1252. To get characters outside of that encoding, you use the Java unicode escape, which is the four digit hexidecimal encoding of the unicode code point, prefixed with '\u', such as '\u00f3'. The Eclipse editor will do this for you automatically, but if you are editing the file with another editor, this escape encoding will be required.

Make sure you are testing your code on an actual device, and not just the simulator. I learned this the hard way. I spent many hours trying to figure out why my translated text was showing as "?????", and once I tried it on the actual device, the translations showed with no problem (japanese, chinese, russian, arabic, etc).

Related

German localized string appears in English

My problem is very odd. I am developing an app in 6 different languages (including English and German) and I have localized every single string within the project. Therefore, some texts in the app display in English instead of German.
This happens only for German and always for the same texts. I have run a search of the English strings that shouldn't appear and it is only in English localization files (base files). I clean the project, checked the IDs of the Labels, and anything else. Nothing worked...
Did someone went into a similar issue ?
EDIT: If I try playing with ordering my strings in the German strings file, then I can get the right translations ! But some others won't work anymore.... It looks like a big bug from xCode but it's totally messing up all the project !
Please check you file with your localised strings in German and check that keys are the same you asked in LocalizedString() for that labels.
It happens when LocalazedString doesn't find string for German locale and return it for default locale (English).
Finally found it. It appears that a character has been somehow inserted in the end of a commented line. This character then appears as a comment in xCode, but it is not. Finally, at runtime all translations in lines after this unwanted token will be ignored.
xCode will not help you nor give any warning about it....

Localization not working on Xcode

I can't get my app to work with localization.
I have created a Localizable.strings file and ticked the languages that I am localizing. (For now I have base, english and spanish.)
Localized storyboard with three languages.
In Project settings > Info I checked Use Base internationalization and all languages are correctly added. (Moreover, beside the language it shows 2 Files Localized, which I guess they must be the storyboard and .strings file.
I am using this example for testing:
self.loginLabel.text = NSLocalizedString(#"login", #"Login text info");
This is how the Localizable.strings (Base) file is looking like:
"login" = "Log in";
However, it is not working and instead it is showing login. Have I forgotten a key step?
BTW: I have tried already changing the login text just it case something was overriding the label.
Those are the steps indeed, I don't think you've left anything out. I usually set the comment to nil instead of another NSString though - not sure if that makes a difference.
However, rather than in only base, make sure you're adding the same line also to the English and Spanish files (obviously translated as appropriate).
Next, for the language to show up, set the device to said language. Close your app and start it again. Strings should now show up in the other language.
Note that the Simulator often has trouble with new translations, especially when they've been added to an already deployed app. In that case, remove the app from the Simulator, click on Product - Clean, and re-deploy.
In my case, it didn't work because the UILabel text was set as "Attributed" instead of "Plain" in the Attributes Inspector.
Localization with a .strings file doesn't seem to work on Attributed strings.
I even had a storyboard with mixed Plain and Attributed string labels, and the localization only worked on the Plain ones.
For anyone having a similar issue in the future:
Check if your *.strings file has any non-printed characters.
I used JavaScript for a simple task and didn't realize it included some whitespace characters.
An easy way to check is to put the translation at the top of the file and see if it works. If it does, there might be some whitespace characters. The next steps are... binary search and remove the whitespace characters.

How to read international character sets using CoreText on iOS?

I am trying to load international character glyphs on iOS using CoreText, but I am having some trouble. I am trying to use the following function call to create the font:
CTFontCreateUIFontForLanguage(kCTFontUIFontUser, 15, (__bridge CFStringRef)#"zh-CN");
However, this does not return Chinese characters. Instead I get the regular default en-US font file. What am i doing wrong here? Also, is there a way to get any font, not just the system fonts, or maybe set the font used by these constants? Is there another function call I should be using?
Furthermore, is it possible to determine which built in iOS fonts are capable of rendering international characters and which are not? I would really hate to have to load in my own TTF file, but if the font we want can't support international characters by default, we will have no choice. I am aware that there are certain fonts that support international characters such as "ArialHebrew", but I was hoping that we could use the same font face for all character sets.
Thanks.
EDIT - I also tried the language code with an underscore instead of a dash; no luck.

DataTables, PDF and special characters

I am using DataTables and the TableTools PDF export function. The PDF-export does not take care of certain special characters and translate them into rubbish (or ISO equivalences, i guess). The characters are '●' ●, '○' ○, and '‭٭‭' ٭.
Is there any way to define the character set for the PDF so I can preserve those special characters? (I'm guessing that character set is the problem) Or any other workaround?
No, there isn't a way to configure the character set for the PDF. DataTables, or specifically its TableTools add-on, uses a fairly limited Flash-based PDF exporter.
You can, however, edit the ActionScript used to make the TableTools Flash add-on.
Download TableTools and look in the archive's \media\as3 directory for .as files.
If you don't have Adobe's software for Flash authoring, you might try the open source Adobe Flex.
A late answer (to my self) but others could benefit. I figured out to use mPDF instead. It supports UTF8, languages with special characters and embedded stylesheets.

unicode to Ascii API

Hi I am developing an application to display Indian language in application. The text that i use in my application is in Unicode format. I would like to know how can I convert these unicode to ASCII so that I can Display them on my application
Malyalam Unicode
The font file has wrong unicodes for the malyalam characters, using the font editor you need to write the corresponding malyalam unicodes and then it might work properly..
But why do you need to convert into ASCII? You can directily show unicodes and it would get converted to corresponding language..
Please see this link, i guess this would help:
See this at blackberry forums

Resources