You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -85,10 +124,10 @@ The available extractors are the following:
85
124
86
125
*`Gettext\Extractors\Po` - Gets the strings from PO
87
126
*`Gettext\Extractors\Mo` - Gets the strings from MO
88
-
*`Gettext\Extractors\PhpCode` - To scan a php file looking for all gettext functions
89
-
*`Gettext\Extractors\JsCode` - To scan a javascript file looking for all gettext functions
127
+
*`Gettext\Extractors\PhpCode` - To scan a php file looking for all gettext functions (see `translator_functions.php`)
128
+
*`Gettext\Extractors\JsCode` - To scan a javascript file looking for all gettext functions (the same than PhpCode but for javascript)
90
129
*`Gettext\Extractors\PhpArray` - To get the translations from a php file that returns an array
91
-
*`Gettext\Extractors\Jed` - To scan a json file compatible with the Jed library
130
+
*`Gettext\Extractors\Jed` - To scan a json file compatible with the [Jed library](http://slexaxton.github.com/Jed/)
92
131
*`Gettext\Extractors\Blade` - To scan a Blade template (For laravel users. Thanks @eusonlito)
93
132
94
133
## Generators
@@ -111,9 +150,9 @@ The available generators are:
111
150
*`Gettext\Generators\PhpArray` - Exports to php code that returns an array with all values
112
151
*`Gettext\Generators\Jed` - Exports to json format compatible with [Jed library](http://slexaxton.github.com/Jed/)
113
152
114
-
To ease the work with generators and extractors you can use the magic methods availables in `Gettext\Translations`to import and export the translations in all these formats:
153
+
To ease the work with generators and extractors you can use the magic methods availables in `Gettext\Translations`that import and export the translations in all these formats:
The extractors magic methods are static classes named `from + [Extractor] + [File/String]`, for example `fromPhpArrayFile` or `fromJsCodeString`. The generators magic methods use the names `to + [Generator] + [File/String]` for example `toPhpArrayFile` or `toPoString`.
127
-
128
-
129
-
## Usage example
130
-
131
-
```php
132
-
//Include the autoloader if you don't use composer or PSR-4 loader
To import translations, the methods are static and named `from + [Extractor] + [File/String]`, for example `fromPhpArrayFile` or `fromJsCodeString`. To export use the methods named `to + [Generator] + [File/String]` for example `toPhpArrayFile` or `toPoString`.
0 commit comments