Current Culture:
Current UI Culture:

Esperantus.GetCurrentNeutralCultureName:
Esperantus.GetCurrentUINeutralCultureName:
Esperantus.GetCurrentRegion:

Esperantus.Autolearn:

My translation from resource file       

How to use localized images

  1. Add an Esperantus.Webcontrols.Image control to the page
    <tra:Image id="Image1" runat= "server"></tra:Image>
  2. Set the ImageUrl property using the special key %%CC%%
    <tra:Image id="Image1" runat= "server" ImageUrl= "~/Images/flag_%%CC%%.gif"></tra:Image>
  3. Add the special key %%CC%% to resource files. Usually it should be the same of the neutral culture associated to the current specific culture or can be the specific culture itself. If you do not add the key to resources it will be used the CurrentUICulture.Name itself.
  4. In our demo we have defined three neutral cultures ('it', 'fr' and 'en') and a specific culture for en-US.
  5. When you choose an italian laguage you get italian flag (for it, it-IT and it-CH)
  6. For english we have a specific culture flag for en-US and UK flag for english neutral culture. In this case you get the USA flag when you select english-USA and the english UK flag for all other ex-XX cultures as well as en only.
  7. For non supported language (default) whe have set %%CC%% to smile so for other languages we get a smile flag. This is the default and is saved in Strings.resx file.
  8. Please note that you have not to write a single row of code. All you have to do is to use %%CC%% string in your filenames.
  9. Please note that starting "~/" character is translated correctly to application path. Even if you are using .Net Framework 1.1