can not retrieve dictionary item from surface controller
Hi all,
I have my website in 2 languages, for login I am using
SurfaceConrtoller. To render error message according language I am using
dictionary Item as umbraco.library.getdictionaryitem("ErrorMessage")
but it is not returning me any value, just a blank string.
is also not working for me. GetDictionaryValue as well asumbraco.library.GetDictionaryItem returns only empty string for me in my ajax action method. Can you please specify, Is there any other change I need to make to this thing work?
Note: System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(Request.Form["culture"]); will throw a null reference exception for me.
can not retrieve dictionary item from surface controller
Hi all,
I have my website in 2 languages, for login I am using SurfaceConrtoller. To render error message according language I am using dictionary Item as umbraco.library.getdictionaryitem("ErrorMessage")
but it is not returning me any value, just a blank string.
I am using Umbraco 6.0
hi Fuji ,
I already have tried that one but that is also not working :(
hi Fuji ,
I already have tried that one but that is also not working :(
Hmmm,
Ok did you add another language under settings > languages ?
If not add another one, and for this to work you will need to set hostnames under each of your default homepage.
yes .. I have added 2 lang under languages
Can you post your entire code ? you did set the hostnames as well right ?
Try using this code :
@Umbraco.GetDictionaryValue("More")
I had the same problem. More info here : http://our.umbraco.org/forum/templating/templates-and-document-types/39251-Surfacecontroller-and-ajax-request-to-action
Dave
Hi Dave,
While on the English Site , is it possible to get the Value of DictionaryItem in French Version ?
Hi, Dave I encountered same issue and
is also not working for me.
GetDictionaryValue
as well asumbraco.library.GetDictionaryItem
returns only empty string for me in my ajax action method. Can you please specify, Is there any other change I need to make to this thing work? Note:System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(Request.Form["culture"]);
will throw a null reference exception for me.thanks Dave :) its working now
If anyone was struggling with @Umbraco.GetDictionaryValue, I had to set CurrentUICulture culture to make it work.
is working on a reply...