Does anybody know how the language switcher plugin sets the language links in a short notation? For instance, instead of 'English' I would like to show 'EN'
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Plugins
Solved by pamtbaau View solution
@TonHaarmans, Try the following steps:
-
Copy file
/user/plugins/langswitcher/templates/partials/langswitcher.html.twigfrom the Langswitcher plugin, into your inherited theme's folder/user/themes/mytheme/templates/partials/. -
In that copied file, on line 26, replace
{{ native_name(language)|capitalize }}with{{ language|upper }}:Resulting in:
TWIG<li><a href="{{ lang_url ~ uri.params }}" class="external{{ active_class }}">{{ language|upper }}</a></li>
Please note that you should make the changes in an inherited theme, else your changes will be lost when Langswitcher gets updated.
last edited 08/28/20 by pamtbaau
Thanks pamtbau!
worked like a charm!!!
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 43 | 1 week ago | ||
| 2 | 53 | 4 weeks ago | ||
| 3 | 1179 | 1 month ago | ||
| 1 | 47 | 1 month ago | ||
| 3 | 72 | 2 months ago |