How to make constant UI in English and Arabic in Blackberry? - blackberry

I am making one application which can support English and Arabic language. My almost all code is done but now i am facing one problem that ,when i run application setting English language it looks great,but for arabic my UI get distrubed because English language has left allignment and Arabic has right allignment by default....what to do now ??please any one have idea then please help me.....waiting for reply

If it's about right align UI elements - use the Field.RIGHT style to have your components right align. It is left aligned by default. If you are using a HorizontalFieldManager you will also want to set the style for the scroll direction to be LEFTWARD.
To set the style pass in these in the components constructor OR'ed, so:
new myField(Field.RIGHT | Manager.LEFTWARD);
Use the Locale object to determine which language is currently set and set the alignment based on it.

APPROACH: Using third party library
Have a look at Arabic and English.
LWUIT UI library is pretty easy to create a common UI for both left-to-right and right-to-left languages. It might sound an uphill task now but going forward you will need to
support multiple ODM's
multipe screen device resolution
multiple flavors of VM, etc
LWUIT library resolves all these problems and to top it the library source code is licensed under GPLv2 with the classpath exception. This essentially means you can use this library in your commercial projects. It is supports most mordern Blackberry OS's.

Related

iOS UI hang when change language from app setting

Dallini UI Reflection Issue -
We are developing a multilingual app, where we need to support English and Arabic Languages, Application also provides an option in setting to change their language preference independent to what they have chosen in Settings of their iPhone. Considering Arabic is right to left language different to English, we are using the following code to change the navigation and UI flow.
UIView.appearance().semanticContentAttribute = .forceLeftToRight or UIView.appearance().semanticContentAttribute = .forceRightToLeft
However Our Application is lagging and behaving very slow in transition and Table Scrolls just after using this above code. We also tried commenting the above line just to make sure that this is the very same line which is creating this issue. We have also used the analysing tools and saw that after using this code It Increases the over all memory Utilisation.
Please suggest with the correct method/option to be used here as we already achieving the localised String file to manage the content in the application but we also need to reflect the UI and navigation according to the language preference he/she has set on the application independent of what is there in the settings.

JavaFx 8 RTL support

This is a follow up question to this question:
JavaFX title bar RTL not supported?
I just learned how to localize the string in an app I'm building. The language I want to add support to is an RTL language.
Is the setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); the formal way to support RTL? Do I need to check everywhere in my code my locale and then set the node orientation accordingly? And what if I use FXML for my layout and not Java code?
Isn't there a simpler way to support RTL and make the application automatically change the orientation to some controls of my choosing with setting a property or something and not using that setNodeOrientation directly?

Mirror programming for uicontrols in xcode

I am new to multi-language app.
What I am doing is,
an app with two languages.
English & Arabic
The language of the app depends upon the device language.
(I want to change this too, that app language should be controlled from inside the app. not device dependant but thats next question)
I am having some controls like UIButton,UITextField,UILabel, etc....
When my app is in English I gave these controls frame starting from left corner of device, and when my app is in Arabic I gave them frames starting from Right corner of device. (As arabic is written from Right - to - left)
My Question is,
For this purpose I need to do extra work,
i.e. check device language and then set the frames of control.
on each view I may have "n" number of controls, and giving the frame sizes to all controls for both language doesn't seems good from my view.
Is there anything available in Xcode itself by using which I can do this.
means I need to give frames for default language (i.e. English) and if my device language is change to Arabic then frames of Controls will be automatically Mirrored from Right to left.
Following screens may give some idea.
(I used different frames for all those controls checking device language)
Any help is accepted.
Thanks in advance.
sorry If question is asked already. But I didn't find anything.
If anyone found then link to that is Welcome :)
From Supporting Right-to-Left Languages:
Your user interface should be mirrored when displaying right-to-left languages. If you use base internationalization and Auto Layout, most of the user interface will appear mirrored automatically for you. The text direction changes to right-to-left with the exception of phone numbers and country codes which are always left-to-right. Some views and controls in your user interface may not change direction automatically which you can fix programmatically.
They functionality you're looking for is called Auto Layout which was introduced a few years ago by Apple. It will handle lots of things you need, but there's also a lot to do for you. The guide above will guide you through the necessary steps.
Update from iOS 9.0:
iOS 9 brings comprehensive support for right-to-left languages, which makes it easier for you to provide a flipped user interface. For example:
Standard UIKit controls automatically flip in a right-to-left context.
UIView defines semantic content attributes that let you specify how particular views should appear in a right-to-left context.
UIImage adds the imageFlippedForRightToLeftLayoutDirection method, which makes it easy to flip an image programmatically when appropriate.
To learn more about providing a flipped user interface, see Supporting Right-to-Left Languages.

Supporting multiple screen sizes

I want to build a mobile application in Delphi, but I can't seem to figure out how to handle multiple screen sizes. AndroidStudio has a nice relative layout for this, but I can't find anything alike for delphi. Am I supposed to build a multiple form designs for each screen size?
I'm using XE6, I am requoired to use Delphi as the programming language.
I have already figured it out, you have to use the Align property on every single control you add to the form.

Multi Language Design support in IOS

I want to develop ios app which support multi language, country wise.
So when app will supporting English language, its design should be left to right and when app will supporting arabic language for example then, design/text should be right to left.
So any body has any idea for this functionality? Or we need to manage it programmatically manage?
Thanks,
Hardik Shah
As Mike Weller mentioned in his comment, Autolayout should do this:
https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html#//apple_ref/doc/uid/TP40010853-CH1-SW1
"You don’t even have to specify new layout for languages like Hebrew and Arabic in which the left to right ordering of elements themselves should generally be reversed."
This question seems to have been answered a couple of time before, including here:
Right to left and left to right languages in the same app?
and here for determining which direction the language should be:
iOS: Determine if device language is Right to Left (RTL)

Resources