Valuelist internationalization form DB tables

Hello,

About to fill valuelist from table where column name is valuelist_name
http://omar4.dotnet35.hostbasket.com/servoy/valuelist_general.aspx
and display should be filled with values for certain i18n:message.key internationalization keys

Or as work-around solution (not recommended), to fill it with Custom values, but for dataprovider-display value pairs (dataprovider differs from display value) need to have sg like: 13 | i18n:message.key
When valuelist is filled with i18n:message.key and displayTag is checked -it works as expected; but dataprovider is same as text value for i18n:message.key;

displayTag check doesn’t work when i18n keys are read from DB

How to internationalize valuelist?

Regards

Tokajac:
Or as work-around solution (not recommended), to fill it with Custom values, but for dataprovider-display value pairs (dataprovider differs from display value) need to have sg like: 13 | i18n:message.key

Why not recommended filling it with custom values :?: . I only work like this:

var _query = 'SELECT country_id, isnull(TR.description, country_code) FROM country \
				LEFT OUTER JOIN translations TR ON TR.entity_id = country_id AND TR.entity_type = ? AND TR.language_code = ? \
				ORDER BY TR.description';
var _ds = databaseManager.getDataSetByQuery('myServer', _query, [globals.entity_type_country, globals.language_code_user], -1)

var _id_array = _ds.getColumnAsArray(1)
var _desc_array = _ds.getColumnAsArray(2)

application.setValueListItems( 'countrynames',  _desc_array, _id_array);

This works fine and the performance is well too.
Just in my framework I’ll load this valuelist if not loaded, or when the contents of the country table was changed.
This too avoid that there are a lot of queries are fired to the database

So if you have simple valuelists, then use the 13 | i18n:message.key like described above.

If you want to create a valuelist based on dynamic values and translations (using your own translation table), then do it like the above sample.

Thank you for your response, Martin!

Just in my framework I’ll load this valuelist if not loaded, or when the contents of the country table was changed.

Can you share how do you implement protection, as I run into couple issues described in
http://forum.servoy.com/viewtopic.php?f=22&t=16654&p=89986#p89986

With valuelist_name column approach there are no issues

Regards

As extension to valuelist_name approach:
I put simple calculation clc_field_value_i18n that returns i18n.getI18NMessage( field_value ) where field_value is column that contains message.key
and clipped it in show in field list of the valuelist
But in browser get exception on the that label: NOTFOUND@Mozilla…
Why it doesn’t display message value from i18n table?

Also, got on my mind to create relation between combo_values and i18n tables?

Regards

Notify if there are any news on internationalization in valuelist_name column approach, please
Submitted a case (while ago) also

Regards