A tumblelog CMS built on AJAX, PHP and MySQL.

lang.functions.php 399B

12345678910111213141516171819
  1. <?php
  2. function initIdioma($lang = "en") {
  3. global $locale, $l10n;
  4. $input = new FileReader(dirname(__FILE__)."/../idiomas/". $locale ."/lang.mo");
  5. $l10n = new gettext_reader($input);
  6. }
  7. function __($text) {
  8. global $l10n;
  9. return $l10n->translate($text);
  10. }
  11. function T_ngettext($single, $plural, $number) {
  12. global $l10n;
  13. return $l10n->ngettext($single, $plural, $number);
  14. }
  15. ?>