class CsvFileLoader extends FileLoader

CsvFileLoader loads translations from CSV files.

Methods

load(mixed $resource, string $locale, string $domain = 'messages')

Loads a locale.

setCsvControl(string $delimiter = ';', string $enclosure = '"', string $escape = '\\')

Sets the delimiter, enclosure, and escape character for CSV.

Details

in FileLoader at line line 26
MessageCatalogue load(mixed $resource, string $locale, string $domain = 'messages')

Loads a locale.

Parameters

mixed $resource A resource
string $locale A locale
string $domain The domain

Return Value

MessageCatalogue A MessageCatalogue instance

Exceptions

NotFoundResourceException when the resource cannot be found
InvalidResourceException when the resource cannot be loaded

at line line 59
setCsvControl(string $delimiter = ';', string $enclosure = '"', string $escape = '\\')

Sets the delimiter, enclosure, and escape character for CSV.

Parameters

string $delimiter delimiter character
string $enclosure enclosure character
string $escape escape character