set default locale in lwuit? - java-me

How to set default locale in lwuit(J2ME) and then how to change the default locale in lwuit? I'm using resource file for localization strings. Can any one give idea to solve this?
Thanks in advance.

Ok I will try to solve your issue.
To set a locale to yout LWUIT app you need to use Hashtable wich have your texts' values.
Are you using the Resource Editor? It will be helpfull for you in this moment. In the Resource editor you can build a table, in several columns, that have all your values ​​in the various languages
You must use the L10N values. You should catch them and use it like this:
Hashtable h = res.getL10N("NameOfYourL10N", "languageColumName");
UIManager.getInstance().setResourceBundle(h);

AFAIK you can't change the locale through your Java ME coding. LWUIT allows to create multiple locale on ResourceEdit and you can read that locale from ResourceEdit. To identify the phone's current locale, use this code,
System.getProperty("microedition.locale");

Related

Making Theme Config Fields multilang?

I know you can make non editable config values multilang in via src/Resources/config/config.xml but is it also possible for fields defined in src/Resources/theme.json?
This does not seem to be possible as in the admin panel you cannot switch the language at that point.

Setting globally defined defaults for certain table options

I am curious to know if you could set a default global option for all tabulator tables. I want these options set on all tabulator tables throughout the application
ajaxLoaderLoading: "<div class='spinner'><div class='loading_circle'></div></div>",
placeHolder: "No Data Available",
My first thought was to use module extension but I don't believe that is a solution I am looking for. Ultimately I just want to avoid declaring the same default options for all tables. Any ideas or insight is appreciated, thanks!
The only way to do that would be to edit in Tabulator.js Library and hard code it, I wouldn't suggest doing that if other developer updates it your code will break.
You can set a global string for
"<div class='spinner'><div> class='loading_circle'></div></div>"
and "No Data Available" use it everywhere you initialize Tabulator
wrap your call to Tabulator in a function or a custom class and just instantiate your custom code with a config object that can extend/override your default settings object.

Adding a LIKE Finder on a Localized column in Liferay Service Builder

I have a column that have been set to Localized="true", is there a way to add a finder that only matches LIKE on specific locale?
Unfortunately, I don't think it would be possible: localized columns are stored as xml strings in db, and I haven't found any example of a search like this in Liferay source. Have you considered using the index? It would be way easier to do a LIKE query for a localized field.
You can use xPath (if you use a db engine that supports it, for example postgresql)

Windows phone strings and localization

A vanilla Windows Phone device is populated with many string resources - for example 'Settings' and beneath 'Settings' lies 'location' among others. At least this is the case for the en-GB UI language. I would like to access the full list of device-loaded strings, not just for en-GB, but for every UI-supported language. That is, I'm looking for the full list of en-GB UI strings, plus their parallel translations in the full set of UI-supported languages. Can anyone help me find them? Do I need a special SDK? Does Microsoft simply 'publish' them somewhere? Or do I need to write some C# to query an on-phone assembly?
The strings used by the OS and the native apps are not available via any public method.
If you are looking to translate your app you need to translate text in context to where you use it. It is not a straight copy and paste exercise. This means you can't just reuse the translations from another source. (Unless it's the exact same context.)

difference between rad masked text input and radmasked text box?

well i tried their web site also,they are only providing details regarding there use i mean about controls.
what is the exact difference between both of the above mentioned?
This Telerik's forum post answers, I think: http://www.telerik.com/community/forums/silverlight/maskedtextbox/is-it-possible-to-use-a-radmaskedtextinput-as-a-multiline-text-area.aspx#1863327
The RadMaskedInput controls don't support a "no-mask" scenarios at
the moment...
This is why ... it would be best to take
advantage of the RadMaskedTextBox control. It has a property MaskType,
which you can set to None. Also in order to make it multi-line, you
need to apply a custom style to its ExtendedTextBox element and set
its AcceptsReturn property to True.

Resources