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.

Plugins

How to let people set plugin variables in different languages in Admin

admin form plugins

Started by Anna 6 years ago · 0 replies · 539 views
6 years ago

Hey everybody,

I am writing a plugin with some configurable text strings. These should be different for all languages available. Ideally, in Admin, when someone opens the plugin settings in English, they should be able to enter the English bits of text, and when they open the plugin settings in Burmese, they get empty text fields all over again and can enter the Burmese strings. Or even better, I would like to offer some defaults for each language which can then be changed as needed.

In my Antispam plugin, I put the different strings in the languages.yaml file. This works fine, but I don't know how to make this editable via the plugin settings in Admin. Or should I put language sections in the plugin's yaml/config file? How? Is there perhaps a plugin that already does something like this?

As always, thank you so much for your time and ideas!

last edited 05/27/20 by Anna

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 54 1 week ago
Plugins · by Xavier, 4 weeks ago
2 61 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1188 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 54 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 79 2 months ago