Try our conversational search powered by Generative AI!

Translations in gadget


We are developing a a gadget for EPiServer with the aim to publish it through EPiServer nuget feed. When looking into translating texts in the the gadget we started looking into the i18n setup described here

But if we are to pack a xml-file with the translations in the nuget pack can we always put it in the Resources/Languagesfiles? This can be configured i each site differently so how to make sure that the translations are included correctly?

Is there a way to have these files inside the modules/_protected/gadgetfolder instead or how is this kind of things handled in the best way when having it as a nuget package? We tried putting the files in different folders of the module but if the file is not correctly placed the whole edit ui stops working.

May 11, 2017 8:46

I will favour Valdis solution for generalization purposes,


May 11, 2017 9:23

But it feels a bit wrong to include this whole other plugin to EPiServer just to be able to have translated texts in a widget. The idea is to have this package as selfcontained as possible so that when installing this it would not require more than a specific EPiServer version. Adding dependency to a another plugin might constrain the ability to update this package to support versions of EPiServer that the other plugin might not yet have support for (if that will happen)

May 11, 2017 11:46

I would include the xml file as an embedded resource.

If the values has to be modified to site specific values, you could add a new xml-file with the same keys to override the values from the module.

May 11, 2017 12:23

Excellent! The embedded resource solution fits very well. After setup like Marijas answer in this thread ( it works perfectly. Thanks for the input!

May 11, 2017 12:39

Happy to help, especially since you are putting it on the nuget feed :-)

May 11, 2017 12:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.