class Illuminate / Translation / FileLoader
You are viewing an older version of the documentation. For the latest, please visit master documentation.

FileLoader

Implements

Properties

protected

$files Filesystem

The filesystem instance.

Default: null
protected

$path string

The default path for the loader.

Default: null
protected

$jsonPaths array

All of the registered paths to JSON translation files.

Default: []
protected

$hints array

All of the namespace hints.

Default: []

Methods

public

__construct ( Filesystem $files , $path ) : void

Create a new file loader instance.

Parameters

public

load ( $locale , $group , $namespace ) : array

Load the messages for the given locale.

Parameters

  • $locale string
  • $group string
  • $namespace string|null
protected

loadNamespaced ( $locale , $group , $namespace ) : array

Load a namespaced translation group.

Parameters

  • $locale string
  • $group string
  • $namespace string
protected

loadNamespaceOverrides ( array $lines , $locale , $group , $namespace ) : array

Load a local namespaced translation group for overrides.

Parameters

  • $lines array
  • $locale string
  • $group string
  • $namespace string
protected

loadPath ( $path , $locale , $group ) : array

Load a locale from a given path.

Parameters

  • $path string
  • $locale string
  • $group string
protected

loadJsonPaths ( $locale ) : array

Load a locale from the given JSON file path.

Parameters

  • $locale string
public

addNamespace ( $namespace , $hint ) : void

Add a new namespace to the loader.

Parameters

  • $namespace string
  • $hint string
public

namespaces ( ) : array

Get an array of all the registered namespaces.

public

addJsonPath ( $path ) : void

Add a new JSON path to the loader.

Parameters

  • $path string
public

jsonPaths ( ) : array

Get an array of all the registered paths to JSON translation files.