Some way to translate "Clear choice" in Combo box

Discussion forum about all things TD Mobile.
Posts: 24
Joined: 03 May 2017, 08:00
Location: Finland

Some way to translate "Clear choice" in Combo box

Post by -tommi » 06 Oct 2016, 08:30

TDMobile can quite well manage different languages and translations via export/import of language files.

But is there some way to change the Clear choice of Combo box by language?
It can be different in phone and tablet modes, but I found no way of changing it by language.

It is quite awkward to display "Select Type" etc. for every Combo box, when every other text in page is in Finnish or Swedish.

Posts: 117
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Some way to translate "Clear choice" in Combo box

Post by a_sivababu » 06 Oct 2016, 12:29

As Per my understanding, if it is label family then you can use change language through IDE or export/import or i18n but this is one of the value in the combobox and this does not have language conversion.

I have not tested but I think this should work
a) 1. add the below entry in combobox controls in td.js
_this.options.emptyChoice = Td.Localization.resolve(_this.options.emptyChoice); after var value = dElem.val();
2. compress/minify td.js to td.min.js with any minifier tool.
3. overwrite with this td.min.js in /websource folder
4. add the lookup value in i18n (OR ur customized i18n) for "Select Type"

Please note that this is not advised by Gupta and you have to take care this changes whenever you update your version. OR I think there could be some other way to extend this control and set only JS variable "emptyChoice" but i am poor in JS.


b) 1. Do not use the clear Choice from property
2. add this value as well in your table for different language.
3. While inserting or updating, check for this place-holder value and if exists then insert NULL value
4. While populating or New entry, you set this and populate as first value from index.

However this can be considered as bug from Gupta and can be fixed in future version.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests