Re: Move agreement to the language dir?
Reply #1 –
Makes a lot of sense to me!
Re: Move agreement to the language dir?
Reply #2 –
Actually, while re-reading my post, I got another strange idea.
Provided this (even moving the agreement) is to me a 2.0 line of thoughts, I was wondering as well: hmm... in the past it made sense to have language files in php because we were using globals and variables inside strings, etc. But today is more just to have the array handy.
Then why don't we try with JSON or YAML files and a kind of "cache".
I mean: the language files in JSON or YAML, then a kind of "task" that reads the text files and converts them into php files stored in the cache directory (that should become mandatory).
The advantage would be that the integrated language editor would become much easier (no need for fancy tricks to try to avoid php injections) and, if the format is YAML, it should also become easier to direct editing the files (I think).
Of course there is the drawback of having to deal with the "read-text-and-convert-to-php" thing, and the keep it up to date, but being necessary only a once in a while, it shouldn't be that difficult (I hope).
Dunno, random thoughts. lol
Re: Move agreement to the language dir?
Reply #5 –
A question that has concerned me about the language files for a long time: Why are these files in the folder "themes/language" and not somewhere in the "sources"?
Re: Move agreement to the language dir?
Reply #6 –
Because in theory, themes could add their own strings.
TBH I'm not sure what structure I would like to see in the "far future", so I'm not sure where to move them (well, if I may dream, one day I would like to see all the files related to a certain feature all in one place, but I guess this is easier said than done).
Re: Move agreement to the language dir?
Reply #8 –
I think also about this ... and I prefer the structure
/Sources
/Themes
/Languages
and in the language folder Subfolder for any language ..
Re: Move agreement to the language dir?
Reply #12 –
They can be n any theme according to the code, but most themes choose not to add their own files. Fr example, that is why some themes may have ThemeStrings.english.php.