Now I try to describe my problem... Hope somebody can help me!
I need to localize asp.net user control, which used on one of umbraco pages. I have almost no experience in development for umbraco, so I tried to localize it in .NET way.
protected void Page_Load(object sender, EventArgs e) { var language = page.Request.QueryString.Get(GeneralResources.LanguageParam);
// if no 'lang' param in request then try to get it from session if (String.IsNullOrEmpty(language)) { language = (string)page.Session[GeneralResources.LanguageParam]; }
There are files MyControl.ascx.resx, MyControl.ascx.de-DE.resx, MyControl.ascx.en-US.resx MyControl.ascx.da-DK.resx in App_LocalResources folder.
LanguageLabel on page shows right culture, but localized values load from MyControl.ascx.resx.
If I delete MyControl.ascx.resx then no text is showing on page at all!
Can anybody show a mistake in my .NET localization or suggest how to localize usercontrol with umbraco?
I have thesame problem I'm usinguser controls. netwithinumbracomacros inthe development environmentworks fine withmy language(Spanish), butproduction appearsin English. I triedsetting theculture inweb.configin this way <system.web> <globalizationuiCulture="es-uy"/>
Have you adjusted the Hostnames for your site once moved to the production server? The culture is set via Hostnames option on a node, and maybe you have it set to something.local, then when going to production @ something.com it's not finding any entries and reverting to english.
Try to right-click your main node and click Manage Hostnames to make sure.
Usercontrol localization
Hi Everyone!
Now I try to describe my problem... Hope somebody can help me!
I need to localize asp.net user control, which used on one of umbraco pages. I have almost no experience in development for umbraco, so I tried to localize it in .NET way.
In MyControl.ascx markup:
And in behind code:
There are files MyControl.ascx.resx, MyControl.ascx.de-DE.resx, MyControl.ascx.en-US.resx MyControl.ascx.da-DK.resx in App_LocalResources folder.
LanguageLabel on page shows right culture, but localized values load from MyControl.ascx.resx. If I delete MyControl.ascx.resx then no text is showing on page at all!
Can anybody show a mistake in my .NET localization or suggest how to localize usercontrol with umbraco?
Read up on this blogpost: http://www.nibble.be/?p=14
Hi,
I'm looking to do the same here, but I have one other question, how can you find what is the current language of the Umbraco application?
Thanks!
Try to get 'lang' parameter from session as you can see on code snippet above: Session["lang"]
I'm using user controls. net within umbraco macros
in the development environment works fine with my language (Spanish), butproduction appears in English.
I tried setting the culture in web.config in this way
<system.web>
<globalization uiCulture="es-uy"/>
but still all the same
some idea?
Hi fedar,
Have you adjusted the Hostnames for your site once moved to the production server? The culture is set via Hostnames option on a node, and maybe you have it set to something.local, then when going to production @ something.com it's not finding any entries and reverting to english.
Try to right-click your main node and click Manage Hostnames to make sure.
-Tom
Hi Tom
I configure the hostname,
I set the hostname to the dictionary but still appear inEnglish
I use asp.net controls, specifically the gridview control
is working on a reply...