Localization: Improved valid shell language check

- Instead of using a string length of 7 (arbitrary to exclude C.UTF-8,
I believe) we check for valid syntax.

- Slight restructuring of the language initialization to ensure gettext
is available

- Renamed submit_lang to change_lang and moved the initialization
portion to the top of main.php. This allows for dynamic language
changes without reloading whole page (although reload is still needed
for content already sent to the browser).

- Suppressed PHP warning for the micro controller version of
OpenSprinkler when checking if OSPi is running on the local machine