Posts tagged with “language”

FluxCP “Addon” – LangSwitcher

Saturday, 11 January, 2014

Hello

Unfortunately, can’t do it as addon.
So we have to work a little

FIrstly need open FluxCP/lib/Flux.php

Find this

And add few lines after

Here you should change $dictionary to your own lang list. For example: “lang_key” => “lang_file” and create translation file in FluxCP/lang/named lang_file.php

And now output switcher
Open FluxCP/themes/your_theme/footer.php or other theme part where you want to place it.

For default theme I added to footer.php some magic code

before this line

add this

Very simple code.
You see lang links where data-lang = lang_key

Thats all!

When you save it and visit your site you will see something like this

9a2df3ccd5873be2f94613a159a6.png

Now you can change language in your FluxCP.

Demo available here: http://ro.sanasol.ws…xcp/?module=woe
Only this page have differences in langs

Interesting fact: drawing logo (two flags with poring(from DeviantArt)) took more time than writing code