fuel/core — pull request #1301 by davispuh (2013-01-25 14:52:27+00:00)
Title: Improve Lang class for easier extendability

Currently if anyone wants to extend Lang class and provide his own way how to determine which is currently active language, he's forced to overload most of Lang functions (load, save, get, set, delete)

This improvement adds function `Lang::get_lang()` which determines currently active language and will be used by all those previously mentioned functions. Thus if you need to change the way how active language is determined you can just overload this one function without need to change anything else.

It doesn't change functionality so it's fully compatible with current applications. Also it improves Lang class existing code.

```php
if ($language === null)
{
$languages = static::$fallback;
array_unshift($languages, $language ?: \Config::get('language'));
$language = reset($languages);
}
```
I mentioned this code part already in #1291 which does nothing more than `$language = \Config::get('language')` and also is used in several places.