joomla / joomla-framework

[READ-ONLY] This repo is no longer in active development. Please see https://github.com/joomla-framework for the individual Framework packages.
http://framework.joomla.org
GNU General Public License v2.0
189 stars 140 forks source link

Text uses own $lang property #265

Closed piotr-cz closed 11 years ago

piotr-cz commented 11 years ago

This allows using non-default languages with Text:

// In application
$language = Language::getInstance('pl-PL');
Text::setLanguage($lang);

// Later on
echo Text::_('HELLO_WORLD');

At the moment Text is using Language::getInstance() which always returns default language object (en-GB)

See discussion at #32