GetPoint.AddOptionEnumList(string,T defaultValue)


#1

Hi all,

Is there any way to set a localized string to the mehotd AddOptionEnumList method in the GetPoint class?

Documentation

Other similar methods have a LocalizeString object as input parameter.

Regards,


(Dale Fugier) #2

If your strings are stored in a localized version of a resource file, then something like this might work for you.

http://www.codeproject.com/Articles/19953/Localizing-NET-Enums

– Dale


#3

Hi Dale,

Thank you for your answer. That solves the localization for the Values of the enum not the Name of the option. I think I didn’t explain well.

What I mean is almost all the AddOptionMethods have as input parameters a LocalizeStringPair:

AddOptionDouble(LocalizeStringPair, OptionDouble)

but the enum one doesn’t have a LocalizeStringPair as an input parameter for the name of the option, only the english string:

AddOptionEnumList(string englishOptionName,T defaultValue)

Then, If I put the localized string into the englishOptionName parameter, the user can’t use the command in scripting mode unless his language is english.

Regards


(Dale Fugier) #4

Because AddOptionEnumList isn’t easily localized, use AddOptionList.

– Dale