2017 © Pedro Peláez
 

library language

Gephart Language Component

image

gephart/language

Gephart Language Component

  • Tuesday, April 3, 2018
  • by MichalKatuscak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 257 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Gephart Language

Build Status, (*1)

Dependencies

  • PHP >= 7.1
  • gephart/configuration = 0.4.*
  • gephart/dependency-injection = 0.4.*

Instalation

composer require gephart/language

Using

config/language.json, (*2)

{
  "fallback": "cs"
}
$container = new \Gephart\DependencyInjection\Container();

/** @var \Gephart\Configuration\Configuration $configuration */
$configuration = $container->get(\Gephart\Configuration\Configuration::class);
$configuration->setDirectory(__DIR__ . "/config");

$language = $container->get(\Gephart\Language\Language::class);

echo $language->get(); // cs (fallback)

$language->set("en");
echo $language->get(); // en

The Versions