ElkArte Community

Elk Development => Feature Discussion => Topic started by: wintstar on August 27, 2015, 09:12:29 am

Title: Language folder
Post by: wintstar on August 27, 2015, 09:12:29 am
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?

Title: Re: Language folder
Post by: Joshua Dickerson on August 27, 2015, 11:02:19 am
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.
Title: Re: Language folder
Post by: wintstar on August 27, 2015, 11:39:06 am
If Theme own language strings needed this might be regulated with a separate language file. A second additional language folder must not be true.

Title: Re: Language folder
Post by: emanuele on August 27, 2015, 01:37:31 pm
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.
Title: Re: Language folder
Post by: wintstar on August 29, 2015, 12:26:42 pm
I put on github an issue https://github.com/elkarte/Elkarte/issues/2197 (https://github.com/elkarte/Elkarte/issues/2197). Move Language folder to root.
Title: Re: Language folder
Post by: Joshua Dickerson on January 03, 2016, 11:17:37 pm
If you change $languagedir it has to still be in a directory with 'languages' or it won't work.
Title: Re: Language folder
Post by: wintstar on January 04, 2016, 02:04:03 am
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,
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


Title: Re: Language folder
Post by: emanuele on January 04, 2016, 02:30:08 am
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".
Title: Re: Language folder
Post by: wintstar on January 04, 2016, 04:20:40 am
This post of mine is not a bug requests, but to lay a proposal in the future the languagefile folder in the root 8) 
Title: Re: Language folder
Post by: Joshua Dickerson on January 04, 2016, 11:53:44 am
Sorry for hi-jacking it but if you remove /languages and move it to /foobar it won't work.
Title: Re: Language folder
Post by: emanuele on January 04, 2016, 12:42:50 pm
And that means it's a bug! :P
https://github.com/emanuele45/Dialogo/commit/79392f00227cb2f3b122d6809707bcdf01224493