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
Looks like posting forum threads is the way to solve problems.
Name and Description no longer work but LanguagePath does, so this is the solution:
[ServiceConfiguration(typeof(ViewConfiguration))]
public class SendToTranslationView : ViewConfiguration<IContentData>
{
public SendToTranslationView()
{
Key = "SendToTranslationView";
ControllerType = "epi-cms/widget/IFrameController";
ViewType = "/MyPlugin/ContentTranslationHistory/Index";
IconClass = "epi-iconCatalog epi-icon--medium";
LanguagePath = "/Translations/ContentView";
}
}
/Kristoffer
Hi!
I have upgraded our plugin to CMS 12 and the followinmg added menu option does no longer get translated it is alway the same language no matter what UI language I select.
[ServiceConfiguration(typeof(ViewConfiguration))] public class SendToTranslationView : ViewConfiguration<IContentData> { public SendToTranslationView() { var localization = ServiceLocator.Current.GetInstance<LocalizationService>(); var currentCulture = Thread.CurrentThread.CurrentUICulture; Key = "SendToTranslationView"; Name = localization.GetString("/Translations/ContentView/Heading"); Description = localization.GetString("/Translations/ContentView/Description"); ControllerType = "epi-cms/widget/IFrameController"; ViewType = "/MyPlugin/ContentTranslationHistory/Index"; IconClass = "epi-iconCatalog epi-icon--medium"; } }
On startup currentCulture is sv-SE but after login the above code is run again and then with en as currentCulture.
It worked just fine in CMS 11, has the ViewConfiguration changed in CMS 12?
Thanks!
/Kristoffer