Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
EPiServer.Global.EPLang.TranslateFallback(
"/multilang/" + CurrentPage["Lang1Code"].ToString(),
CurrentPage["Lang1Code"].ToString() );
Btw,
CurrentPage["Lang1Code"].ToString()
will give you the string value of the property, while
CurrentPage.Property["Lang1Code"].ToString()
will give you the name of the property type (e.g. "PropertyString")
/Steve
CurrentPage.Property["Lang1Code"].Value.ToString()
will give you the value as a string, but an exception if there is no value saved for the property.
/Steve
public string TranslateFallback(string key,string fallback)
in my code but I can't seem to get it to work...
string myHTML = TranslateFallback ( "/multilang/" + CurrentPage.Property["Lang1Code"].ToString(), CurrentPage.Property["Lang1Code"].ToString() );
Compiling error: "The name 'TranslateFallback' does not exist in the class or namespace 'diagnostics.dia_templates.Units.DiaLangMenu'"string myHTML = Translate ( "/multilang/" + CurrentPage.Property["Lang1Code"].ToString );
Works fine... Translate and TranslateFallback are in the same namespace: EPiServer.Core so I can't understand whats wrong?!... /Stefan