StrataFrame Forum

Localization beside of text/string

http://forum.strataframe.net/Topic12815.aspx

By Chan - 11/21/2007

Hi,

How could I localize my UI element such as icon, picture, edit mask, enum description, font, anything required beside of string?



Thank you
By Ivan George Borges - 11/22/2007

Hi Chan.

I'm not sure what you mean by localizing icon, picture, ... but as for an enum description, have a look at this post: http://forum.strataframe.net/FindPost2712.aspx

You create the attributes and pass your Localization Key and True as your parameters.

For the others, I guess you can always check on your localization key and set the apropriate properties to their text or message contents, something like:

Me.MyControl.Text = RetrieveTextValue("My Localization Key")

Hope it helps. Wink

By Trent L. Taylor - 11/28/2007

Ivan's post is right on the money, you can also localize enums with the EnumDisplayValue attribute:

Public Enum MyEnum As Integer
   <MicroFour.StrataFrame.UI.EnumDisplayValue("MyLocalizationKey",True)> _
   None = 0
   <MicroFour.StrataFrame.UI.EnumDisplayValue("MyLocalizationKey1",True)> _
   Apple = 1
   <MicroFour.StrataFrame.UI.EnumDisplayValue("MyLocalizationKey2",True)> _
   Orange = 2
End Enum