Skip to content

Instantly share code, notes, and snippets.

@hejrobin
Created August 1, 2011 11:22
Show Gist options
  • Save hejrobin/1117967 to your computer and use it in GitHub Desktop.
Save hejrobin/1117967 to your computer and use it in GitHub Desktop.
Architect Localization Usage
<?php
// English
$arch->locale->setLocale('en-US');
// Default english dict (en-US.xml)
echo $arch->lang->get('hello_world'); // Hello World
// Bork, english dict (en-US.xml) + translator module
$arch->locale->setTranslator('Enchefenizer');
echo $arch->lang->get('hello_world'); // Hellu Vurld
// Swedish
$arch->locale->setLocale('sv-SE');
// Default swedish dict (sv-SE.xml)
echo $arch->lang->get('hello_world'); // Hej Världen
// Default swedish dict (sv-SE.xml) + translator module
$arch->locale->setTranslator('Fjortis');
echo $arch->lang->get('hello_world'); // hEi VeRldEn
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment