Try our conversational search powered by Generative AI!

Newbie. The language files


Hello everyone.

just starting with EpiServer. In the Alloy sample site I see in Resouces/LanaugeFiles/propertyNames.xml

that file we create manually (not through the admin site)?

There are a lot of properties for different contenttypes. Do we create and populate this file manually as well?

and with the attribute '[CultureSpecific]' for a property in content type file definition we let know EpiServer that we have a version for a specific language for that property?

How EpiServer knows in what file to look the language versions for a property (in this case in propertynames.xml)?

thank you for the expanations.


Jul 24, 2017 18:42


Couple of answers:

  • files in Resources/LanguageFiles directory are created automatically as part of project creation via VS extensions
  • that directory contains Xml files for various localizable resources
  • part of the resources are content type property translations
  • EPiServer will ask to it's configured collection of localization providers (configurable via web.config file in <episerver.framework> element) specific resources in required language (Admin UI language current user is in)
  • and yes - if you add new content type and want to get those page or block properties translated in admin interface - you need to take care of that yourself and add specific resources under correct nodes in Xml file(s)
  • [CultureSpecific] attribute just tells EPiServer that concrete property of the content type is editable for all available languages - opposite of "shared property"- that's editable only for master language and read-only for all the other languages

I would recommend to go through globaliazation section in dev guide.

Aaaand of course answer about localization cannot be complete without IMHO a bit nicer alternative - Xml files are pretty clumsy to work with (especially for devs) that's why I created database driven strongly typed localization provider for EPiServer.

Jul 24, 2017 23:13
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.