Skip to main content
Topic: Language folder (Read 2636 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Language folder

As for all Themes becomes the language loaded from the default theme. Would it not make sense to move the language folder in the root?


Re: Language folder

Reply #1

This question gets asked fairly often. The reason why it is not in a language directory is because if you are creating a revolutionary theme, it might have different text.

I think it's about time to have 2 directories though. One will be the default text and the other will be the theme text. Load the default, then the theme, if it exists. A simple setting in the theme would enable it to check for additional $txt "has_own_txt".

This isn't so much about space as just making themes a little easier to understand.

Re: Language folder

Reply #2

If Theme own language strings needed this might be regulated with a separate language file. A second additional language folder must not be true.

Regards Stephan

Re: Language folder

Reply #3

I'm pretty sure there is already another topic around (or maybe few messages in a topic) about... the topic. LOL

Yup, I'd move that directory somewhere else and find a way to deal with themes.
Bugs creator.
Features destroyer.
Template killer.


Re: Language folder

Reply #5

If you change $languagedir it has to still be in a directory with 'languages' or it won't work.

Re: Language folder

Reply #6

I have not until now tested it. It should work $languagedir = $boarddir . '/themes/default/languages  change to $languagedir = $boarddir . '/languages.

Example
bootstrap.php, index.php,
Code: (php) [Select]
if ((empty($languagedir) || !file_exists($languagedir)) && file_exists($boarddir . '/themes/default/languages'))

    $languagedir = $boarddir . '/themes/default/languages';

change to
Code: (php) [Select]
if ((empty($languagedir) || !file_exists($languagedir)) && file_exists($boarddir . '/languages'))

    $languagedir = $boarddir . '/languages';

https://github.com/elkarte/Elkarte/search?p=1&q=%24languagedir&utf8=%E2%9C%93


Regards Stephan

Re: Language folder

Reply #7

Quote from: Joshua Dickerson – If you change $languagedir it has to still be in a directory with 'languages' or it won't work.
O_o
If it doesn't then I guess it's a bug.
At least I can't think of any reason for having it like that, $languagedir should define a constant the way other directories do and be used "as such".
Bugs creator.
Features destroyer.
Template killer.

Re: Language folder

Reply #8

This post of mine is not a bug requests, but to lay a proposal in the future the languagefile folder in the root 8) 
Regards Stephan

Re: Language folder

Reply #9

Sorry for hi-jacking it but if you remove /languages and move it to /foobar it won't work.