How to override the language variables ?
Closed this issue · 4 comments
I tried copying the language variables to my config file to override them (my client doesn't understand modules but sections are fine) but to no effect. Is there any way to override the language variables without touching at the plugin files ?
Thats a tricky one.
As far as I know there is no build in feature.
I did some testing. Somehow it's not possible to access langugage strings in a field set in the config.php. Althoug I disabled the language loader in the field.
Perhaps something like this could be suitable.
label: Sections
type: modules
translate:
en:
fields.modules.visible: Visible sections
fields.modules.visible.info: Drag invisible sections here to sort them/make them visible.
But for now a fork would be the easiest way I think.
What about using config variables overrides:
c::set('variable', 'text')
And the in your code try to access the config c::get... and if it doesn't exist use the language variable instead?
Edit: and probably create those variables in the form of an array by language?
That would work.
But I'm not sure if using a config variable is the best way to solve this.
I don't have much time right now but I will try to look into this as soon as possible.
Thanks for the translation btw.
It' now possible to change the naming.