dictonary translation issues on classical c# usercontrols
Hello,
I am facing the following issues.
I have a multi language website (english and german) and if i try to use "umbraco.library.GetDictionaryItem("CreateAccount")" in a c# usercontrol it is always shown in english.
If i do the same in a razor syntax "@Dictionary["CreateAccount"]" everything is working fine and text is translated into german
Is razor and a c# usercontrol using different culture settings? I am wondering as on the same page the razor syntax is translating the item while c# control is always showing it as English.
dictonary translation issues on classical c# usercontrols
Hello,
I am facing the following issues.
I have a multi language website (english and german) and if i try to use "umbraco.library.GetDictionaryItem("CreateAccount")" in a c# usercontrol it is always shown in english.
If i do the same in a razor syntax "@Dictionary["CreateAccount"]" everything is working fine and text is translated into german
Any idea why this happening?
Hello,
What version of Umbraco are you using?
If you have the Umbraco Helper available you could do this:
Try if that might work.
Jeroen
hi Jeroen,
We upgraded from 4.7.2 to 6.1.6
But why the Razor syntax behaves different as the umbraco.library syntax?
I don't really know. They should do to same. Maybe check what the culture is in Razor and in the UC. Maybe somehow that is different.
Jeroen
HI Jeroen,
Is razor and a c# usercontrol using different culture settings? I am wondering as on the same page the razor syntax is translating the item while c# control is always showing it as English.
Is there any reason for this?
Hello,
No they should use the same culture settings. You can check the current culture with this code:
Jeroen
is working on a reply...