GetSimpleCMS/GetSimpleCMS — pull request #725 by Zegnat (2014-01-03 18:52:31+00:00)
Title: Make i18n() fall back on en_US language file.

I was looking at how internationalisation was handled when building a plugin and noticed an extra `array_key_exists()` in `i18n()` that wasn’t doing anything. Instead of removing it I decided to patch it up so fallback actually works.

Instead of making `$i18n` global inside the function I access it through `$GLOBALS['i18n']`. This way I was able to include en_US.php without messing up the global variable. If the missing translation exists in en_US.php it is added to the global `$i18n` so it will be found instantly next time.

This does **not** break if someone decides to remove en_US.php, that scenario was tested.

(Feels weird to be working on GetSimple again.)