London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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