Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Language-selector plugin, change selection

Solved by pamtbaau View solution

Started by iclou 6 years ago · 2 replies · 473 views
6 years ago

Hi everybody

I am using the language-selector plugin.

I would like to change the drop-down entries like having "EN" and "DE" (instead of "English" and "Deutsch").

I did not find any place to change this -

Appreciate any feedback.

6 years ago Solution

@iclou, You could try the following:

  • If not already, please create an inherited theme.
    Let's assume you called it 'mytheme'
  • Copy file /user/plugins/language-selector/templates/partials/language-selector.html.twig' into folder '/user/themes/mytheme/templates/partials
  • In the copied file make two changes:
    • Replace line 7 with: {{ language_selector.current | upper }}
    • Replace line 41 with: {{ language | upper }}
6 years ago

Thanks so much - I already use a derived thema and with your hint it works like a charm!
Best wishes !

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 10 hours ago
Support · by Anna, 3 days ago
2 60 13 hours ago
Support · by Justin Young, 14 hours ago
1 30 14 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago