51Degrees Pipeline for PHP

fiftyone\pipeline\ipintelligence\translation\TranslationPaths Class Reference

Detailed Description

Locates the country translation YAML files, which ship in the ip-intelligence folder of the data repository, and loads them.

Static Public Member Functions

static resolveTranslationsDir ()
 Find the Translations directory.
static loadCountriesLocaleMaps (string $translationsDir)
 Load the countries.
static loadAllCountries (string $translationsDir)
 Load countrycodes.en_GB.yml as an ordered list of [code, EnglishName] pairs.

Member Function Documentation

◆ loadAllCountries()

fiftyone\pipeline\ipintelligence\translation\TranslationPaths::loadAllCountries ( string $translationsDir)
static

Load countrycodes.en_GB.yml as an ordered list of [code, EnglishName] pairs.

The file order defines the order of all known countries.

Returns
array<array{0: string, 1: string}>

◆ loadCountriesLocaleMaps()

fiftyone\pipeline\ipintelligence\translation\TranslationPaths::loadCountriesLocaleMaps ( string $translationsDir)
static

Load the countries.

<locale>.yml files (English name to localized name).

Returns
array<string, array<string, string>> locale => translation map

◆ resolveTranslationsDir()

fiftyone\pipeline\ipintelligence\translation\TranslationPaths::resolveTranslationsDir ( )
static

Find the Translations directory.

Searches the ip-intelligence folder of the data submodule inside the cxx submodule at the repository root, then the IPINTELLIGENCEDATAFILE directory as a fallback.