class FileLoader implements Loader (View source)
protected Filesystem | $files | The filesystem instance. | |
protected string | $path | The default path for the loader. | |
protected array | $jsonPaths | All of the registered paths to JSON translation files. | |
protected array | $hints | All of the namespace hints. |
void | __construct(Filesystem $files, string $path) Create a new file loader instance. | |
array | load(string $locale, string $group, string|null $namespace = null) Load the messages for the given locale. | |
array | loadNamespaced(string $locale, string $group, string $namespace) Load a namespaced translation group. | |
array | loadNamespaceOverrides(array $lines, string $locale, string $group, string $namespace) Load a local namespaced translation group for overrides. | |
array | loadPath(string $path, string $locale, string $group) Load a locale from a given path. | |
array | loadJsonPaths(string $locale) Load a locale from the given JSON file path. | |
void | addNamespace(string $namespace, string $hint) Add a new namespace to the loader. | |
void | addJsonPath(string $path) Add a new JSON path to the loader. | |
array | namespaces() Get an array of all the registered namespaces. |
Create a new file loader instance.
Load the messages for the given locale.
Load a namespaced translation group.
Load a local namespaced translation group for overrides.
Load a locale from a given path.
Load a locale from the given JSON file path.
Add a new namespace to the loader.
Add a new JSON path to the loader.
Get an array of all the registered namespaces.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Translation/FileLoader.html