mahtab2003 / Xera

Now Introducing a new and easy way to manage your clients and MyOwnFreeHost hosting accounts.
https://xera.eu.org/
GNU General Public License v2.0
47 stars 39 forks source link

Question #11

Closed tanguy-fgl closed 2 years ago

tanguy-fgl commented 2 years ago

I'm working to translate Xera in other languages with an automated detection of the default browser, my system is working great in other projects and I want to integrate it on all pages. Is there a file that Xera load on all pages? I just have to integrate this code on all the pages and it will be finished: <?php $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); $acceptLang = ['fr', 'en']; $lang = in_array($lang, $acceptLang) ? $lang : 'en'; require_once "app/language/{$lang}.php"; /*I just have to create the languages files using php arrays*/ ?>

mahtab2003 commented 2 years ago

no need to use that just follow this http://codeigniter.com/userguide3/libraries/language.html

tanguy-fgl commented 2 years ago

Thanks it worked image I just want to adapt the

tanguy-fgl commented 2 years ago

Like this one image

mahtab2003 commented 2 years ago

Maybe no

tanguy-fgl commented 2 years ago

Ok, to change the theme you use a form but where does it sends the value because I want to add a toggle switch button for the theme (I think it's better) but I didn't find how to post it

mahtab2003 commented 2 years ago

Xera uses cookies to change theme.