Forum Discussion
Claudius
11 months agoBoss
One possible solution would be going the CSS skin styling route and rely on the lang attribute on the root <html> object, e.g.
html[lang="de"] .lia-button-searchForm-action {
background-image: url(/html/assets/icon_search-german.svg);
}
or even encode the SVG inline
html[lang="fr"] .SearchForm.lia-form-inline .lia-button-searchForm-action {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21.4 21'%3E%3Cg fill=' %23000 ' fill-rule='evenodd' stroke=' %23000 '%3E%3Ccircle cx='8' cy='8' r='7.5' fill='none' /%3E%3Cpath d='M14.24 13.15l6.85 6.17c.38.35.4.94.05 1.34-.34.4-.94.43-1.33.07l-6.9-6.2c.48-.4.92-.85 1.32-1.38z'/%3E%3C/g%3E%3C/svg%3E");
}
If you want to build it in a Freemarker component you should be able to obtain the current user's profile language via:
<#assign userLanguage = rest("/users/id/${user.id}/settings/name/profile.language").value>
Related Content
- 2 months ago
- 2 years ago
- 8 months ago