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

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

admin form plugins

Started by Anna 6 years ago · 0 replies · 667 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 Vladimir Novak, 2 weeks ago
3 298 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 278 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 404 2 months ago
Plugins · by Rene, 2 months ago
2 575 2 months ago
Plugins · by Xavier, 3 months ago
2 491 3 months ago