Open gab0rka opened 10 months ago
@gab0rka: Interesting, what do you think @alecpl?
I don't like the idea of a new option, but I think that maybe "overwrite mode" would be a better solution for skin localization.
@alecpl Do you suggest to make merging the default? Or what does "overwrite mode" mean?
Hi,
It would be a nice feature if there was an option in the skin's meta.json to decide the method of adding (or merging) the localized strings to the system. In my case, I extended the elastic skin just to completely change the login page and I wanted to change the "Username" label to "E-mail address", to provide a bit more information to the user what to write to that field. I found out that I only can do that changing the text in the
program/localization/$lang/labels.inc
file. Putting it in theskins/$skin/localization/$lang.inc
cannot override the system's label, only adds new ones. Theload_language()
function already supports merging the additional texts besides the adding. I think it would be a good way defining a new variable in the skins's meta.json, for examplelocalization_merge
with a boolean value, and parse it in theload_skin()
method. The default behavior should be adding, so nothing changes without explicitly adding the variable to meta.json.