Page 1 of 1

Localized values for string type setting

Posted: Sat May 06, 2017 9:38 pm
by Arcitos
Hello everyone,

does anybody know how i get localized strings to work as values for a string type setting? I want to display an array of allowed values, wich works fine, as long as those values are just "hardcoded" strings:

Code: Select all

allowed_values = {"Asphalt > Concrete > Stone", "Asphalt > Stone > Concrete", "Concrete > Asphalt > Stone", "Concrete > Stone > Asphalt", "Stone > Asphalt > Concrete", "Stone > Concrete > Asphalt" },
But i want those setting values to be localized as well, however, everytime i try to hand over a "localised_string" type, an error is thrown. Is it possible to do something like this:

Code: Select all

allowed_values = {{"pda-setting-score-1"},{"pda-setting-score-2"},{"pda-setting-score-3"},{"pda-setting-score-4"},{"pda-setting-score-5"},{"pda-setting-score-6"}},
Is this possible at all?

Greetings, Arcitos

Re: Localized values for string type setting

Posted: Sun May 07, 2017 3:11 am
by DaveMcW
What happens if you just pass the key string?

Code: Select all

allowed_values = {"pda-setting-score-1","pda-setting-score-2","pda-setting-score-3","pda-setting-score-4","pda-setting-score-5","pda-setting-score-6"},

Re: Localized values for string type setting

Posted: Sun May 07, 2017 6:31 pm
by Arcitos
DaveMcW wrote:What happens if you just pass the key string?

Code: Select all

allowed_values = {"pda-setting-score-1","pda-setting-score-2","pda-setting-score-3","pda-setting-score-4","pda-setting-score-5","pda-setting-score-6"},
The keys will be interpreted as strings, wich in turn results in displaying them as the setting selection options:
Image