class Localization { public function setDomain($path) { if (is_dir($path . '/' . DIRNAME_LANGUAGES)) { bindtextdomain(LANGUAGE_DOMAIN_CORE, $path . '/' . DIRNAME_LANGUAGES); textdomain(LANGUAGE_DOMAIN_CORE); bind_textdomain_codeset(LANGUAGE_DOMAIN_CORE, "UTF-8"); } }
msgid "The directory %s already exists. Perhaps this item has already been installed."mysql_query( "SET NAMES utf8");
$ mysqldump -u [USERNAME] -p --default-character-set=latin1 [DATABASE NAME] > [Exported File Name]
/languages/ in_ID/ LC_MESSAGES/ messages.po and messages.po
/config/base.php
<?php phpinfo(); ?>
define("LOCALE", 'de_DE');
define("LOCALE", 'de_DE.utf8');
function list_system_locales(){ ob_start(); system('locale -a'); $str = ob_get_contents(); ob_end_clean(); return split("\\n", trim($str)); } $locale = "pt_BR"; $locales = list_system_locales(); if(in_array($locale, $locales)){ echo "yes yes yes...."; }else{ echo "no no no......."; }
<?php define('LOCALE', 'pt_BR.utf8'); ?>
<html lang="<?=LANGUAGE?>">