Can someone point out how to make a multilingual usercontrol in umbraco? i have created a simple usercontrol but now that i need to insert it in my template i just realised its displaying the text in english only on both website.
How to i get to translate the Submit and Error Msg in another language depending on the culture i added?
Multilingual UserControl
Hi Guys,
Can someone point out how to make a multilingual usercontrol in umbraco? i have created a simple usercontrol but now that i need to insert it in my template i just realised its displaying the text in english only on both website.
How to i get to translate the Submit and Error Msg in another language depending on the culture i added?
Here is part of my control
Are you have a try with dictionary?
I mean store the static text(such as submit) into dictionary, and set the button text depend on current language.
I try this but doesnt work
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtemail" Display="Dynamic" ErrorMessage='<%= umbraco.library.GetDictionaryItem("newsletterField") %>' runat="server" />won't work as this is a mix up of quotes and double quote chars, but you can still set the error message using codebehind in your usercontrol
RequireFieldValidator2.ErrorMessage = umbraco.library.GetDictionaryItem("key");Cheers,,
/Dirk
Hi,
set the text or errormessage property in your codebehind file to: umbraco.library.GetDictionaryItem(“mydictionaryitem”)
Keep in mind that you need to reference umbraco.dll
@Dirk @David,
Got it working......
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.