function load(k_Context $context) { // Default to English $phrases = array('Hello' => 'Hello', 'Meatballs' => 'Meatballs'); if ($context->language()->isoCode() == 'sv') { $phrases = array('Hello' => 'Bork, bork, bork!', 'Meatballs' => 'Swedish meatballs'); } return new SimpleTranslator($phrases); }
function load(k_Context $context) { return new k_Translation2Translator($context->language()->isoCode()); }
function language() { return $this->context->language(); }