Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Translation on AdminMenu plugin


Hello developers!
Hopefully someone can help me with this one. I’ve developed a custom AdminMenu plugin thats uses EPiServers built in language support. It works fine until I change the user interface language to another language then english. Then my plugin doesn’t get translated to the new language, it remains in english. Although all of the standard admin interface is translated correctly. If it matters my plugin is using this solution,

What do I need to do so my AdminMenu plugin gets translated? Any guidelines?

Mar 16, 2010 9:42

Have you set the Languagepath in the gui plugin attribute and have the lang files set up correctly?

Mar 16, 2010 15:23

Hi Per, thanks for your reply.

I dont use LanguagePath in GUIPlugIn. Do I have to?
All my english translations loads perfectly. The lang file is placed in the lang directory.
The problem is that it always loads the english translation.

Mar 16, 2010 17:03


Yes, you need to set LanguagePath. Otherwise we don't know where in the language files to look for translations. If LanguagePath isn't set we will use the DisplayName and Description properties on the plugin attribute in the UI.


Per Gunsarfs
EPiServer Development Team

Mar 17, 2010 9:01

Hmm but there seems to be a bug in the language handling. When I switch langauge from english to swedish the heading (in admin menu) of my plugin changes to the swedish alternative but all labels etc in the actual aspx file is still in english.

If i change the languagepathroot in the langfile for english so it's not correct I get the language error that the path cannot be found for language "en" but Im running swedish.

Mar 17, 2010 9:23

Glad that some else have found the same problem, thanks Per.
This is exacly what I ment, it always reads the english translation.

Can someone on EPi confirm that this is a bug? Or provide a solution?

Jonas Andersson

Mar 17, 2010 11:08

 I've found a solution and its a simple one. To get the translations working correctly I did this.

protected override void OnPreInit(EventArgs e) {

string lang = EPiServerProfile.Current.Language;




Edited, Mar 17, 2010 11:20

Good that you found a solution, although you shouldn't need that code.

Was wondering if it could be because your plugins aren't using our base classes (PageBase or UserControlBase depending on the type). The language detection is done in the base classes, and if you don't inherite from those you'd need to set it up yourself.


Per Gunsarfs

Mar 17, 2010 12:24

Hi Per,
Im inheriting from SystemPageBase, because I want the same look and feel as the rest of the admin interface.
SystemPageBase inherits from PageBase so it cant be that, or could it?

public partial class VideoQueueAdmin : SystemPageBase { ....... }

Mar 17, 2010 12:51

Yes, SystemPageBase inherits from PageBase, so that should just fine.

It's strange, because our built in plugins don't do anything magical to get the translation to work, so I can't think of anything else you might have missed. The built in admin plugins translate correctly right?


Per Gunsarfs

Mar 17, 2010 12:58

Hi Per,
Yes everything else in the admin interface translates correctly.


Mar 17, 2010 13:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.