23 bindtextdomain(
'default',
APP_PATH .
'locale/');
24 textdomain(
'default');
44 public static function get($sentence)
49 $sentence = gettext($sentence);
54 if (func_num_args() > 1) {
55 $args = func_get_args();
60 $sentence = vsprintf($sentence, $args);
74 public static function nget($sentence1, $sentence2, $n)
79 $sentence = ngettext($sentence1, $sentence2, $n);
84 if (func_num_args() > 3) {
85 $args = func_get_args();
89 unset($args[0], $args[1], $args[2]);
90 $sentence = vsprintf($sentence, $args);
103 public static function cget($sentence, $category)
108 $sentence = dcgettext(textdomain(null), $sentence, $category);
113 if (func_num_args() > 2) {
114 $args = func_get_args();
118 unset($args[0], $args[1]);
119 $sentence = vsprintf($sentence, $args);
134 public function cnget($sentence1, $sentence2, $n, $category)
139 $sentence = dcngettext(textdomain(null), $sentence1, $sentence2, $n, $category);
144 if (func_num_args() > 4) {
145 $args = func_get_args();
149 unset($args[0], $args[1], $args[2], $args[3]);
150 $sentence = vsprintf($sentence, $args);