...
The Theme.ashx supports localized resources by replacing the resource path placeholder values {lang-culture} and {lang} with the current culture. Ex: when the page is in swedish the place holder {lang-culture} will be replaced with sv-SE and {lang} will be replaced with sv if it exist within the resource path. The used language is loaded from the request cookie MERIDIXSTUDIO.language [value: lang].
If a resource is localized the theme package must contain a resource for each of the activated languages in the system or else an theme resource exception will be thrown when trying to load an non existing localized resource.
*This feature is only available from version 3.7 and later.
Code Block | ||||
---|---|---|---|---|
| ||||
.informationDiv
{
background-image: url('Theme.ashx?images/custom/myimage_{lang-culture}.png');
// Is translated to Theme.ashx?images/custom/myimage_sv-SE.png on the server side if the current culture is set to sv-SE
background-image: url('Theme.ashx?images/custom/myimage_{lang}.png');
// Is translated to Theme.ashx?images/custom/myimage_sv.png on the server side if the current culture is set to sv-SE or a neutral sv culture
} |
Theme package structure
The theme package (zip file or folder) should be structured as below (see the individual folder/file descriptions in the next section).
You can add additional files and folders and make use of them through the Theme.ashx handler if needed, if a requiered file does not exist in a custom theme package the default theme resource is used. Its recommended to include all resources even the ones that hasent been changed from the default template in a custom theme since then the theme pipeline is not required to use the fallback mechanism.
...