Created
August 1, 2011 11:22
-
-
Save hejrobin/1117967 to your computer and use it in GitHub Desktop.
Architect Localization Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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