GetSimple Support Forum

Full Version: little fix for setup.php to save during installation chosen language
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a few installations of GetSimple in the past few days. After the third installation I realised, that it wasn't my fault that the language which I chose during installation, wasn't saved to website.xml. I stepped into it and found out, that on install.php you can choose a language (if you have more than en_US in your language folder on setup), but on setup.php this parameter isn't handled. So GetSimple falls back to en_US because the global $LANG is empty at this moment.
So I directly include the chosen language (that for already the second step on installation will continue in your selected language) and write it to website.xml

Attached patch in based on r116
This was broken quite a while back when NY rewrote the functions.php/common.php code.

http://code.google.com/p/get-simple-cms/...php&old=36

I've added that code back in.

Thank you so much for all your hard work over the last week or so finding these bugs. i really appreciate it!
You're very welcome! As an (Ex) Software-Tester, finding bugs and errors runs in my blood ;-)

But, I doubt, this doesn't fix the problem entirely. You have to put it along with the form on setup.php again - otherwise it falls back to standard after hitting "Install now!". But if you would like to use the $LANG in an hidden field of the form - I have to warn you: header.php changes the value of it from e.g. 'de_DE' to 'de'.
Also the direct including of the lang-file helps to have the selected language already on page2 during installation. (As long, as website.xml isn't created, it will always fall back to en_US)
ok, let me look at this. Thanks again...