File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff 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
4135echo $t->gettext('apple');
You can’t perform that action at this time.
0 commit comments