Skip to content

Commit 10dc501

Browse files
author
Oscar Otero
committed
updated docs
1 parent 4025181 commit 10dc501

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,12 @@ use Gettext\Translator;
2424
//Create a new instance of the translator
2525
$t = new Translator();
2626

27-
//Load the translations using any of the following ways:
28-
29-
// 1. from php files (generated by Gettext\Extractors\PhpArray)
30-
$t->loadTranslations('locales/gl.php');
31-
32-
// 2. using the array directly
33-
$array = include 'locales/gl.php';
34-
$t->loadTranslations($array);
35-
36-
// 3. using a Gettext\Translations instance (slower)
37-
$translations = Gettext\Translations::fromPoFile('locales/gl.po');
38-
$t->loadTranslations($translations);
27+
//Load the translations from php files (generated by Gettext\Extractors\PhpArray)
28+
$t->loadTranslations(
29+
'locales/gl/domain1.php',
30+
'locales/gl/domain2.php',
31+
'locales/gl/domain3.php',
32+
);
3933

4034
//Now you can use it in your templates
4135
echo $t->gettext('apple');

0 commit comments

Comments
 (0)