The default localization service uses a provider system to retrieve translated resource files from a predefined location in the project folders.
The provider is configured to look for XML string resource files in a folder under the content root named **lang**. By adding files to this location, you can add your own localizations or override system strings. Translations added to an XML file in the lang directory override system-defined resources.
The default is that the user interface is localized according to the editor’s **Language Settings **>** Personal Language**. However, if you want something more sophisticated, you can create your own localization provider and add some more conditions there. To do this, you have to inherit from `
LocalizationProvider` and register it as described in [Configuring a custom localization provider](🔗).
To get localization to work, specify a physical localization provider or a virtual one in the web.config file under \<episerver.framework>:
When you add the provider, you can add one or more language files in XML format to that location (or as embedded resources if `
EmbeddedXmlLocalizationProvider` is used), such as _ContentTypeNames.xml._
You can give the language file any name and you can have each language in a separate file (or all in one file). In the language file, however, you need a certain structure, as follows.
## Add localized text
You can localize the text shown in the user interface for your content types by adding localized texts in a convention-based format. The following code example shows how to add localized texts for the `
StandardPage` content type, such as the attribute name and description or properties for the standard page like `
If you have a `
StandardPage` content type with the attributes and properties as in the example above, the structure in the language file would be as follows:
### Reuse localization for properties between content types
You can add common translations to an inherited type, for instance `
PageData` or `
If you have your own base classes that are not registered as content types, and you want to add translations to these classes, you must create a `
UIDescriptor` for the base class.
### Localize headers
You can localize headers, such as tabs that are used to group properties, in the top-level section groups.
Group name on the property `
MainContentArea` is referred to `
SystemTabNames.Content` and, as shown in the previous example, `
SystemTabNames.Content` is referring to "Information".
The correct way here is to add <groups> and then the property name.