This commit is contained in:
2026-02-17 14:56:23 +01:00
commit 68f7a95fdf
695 changed files with 154611 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
/**
* Created by PhpStorm.
* User: Micha
* Date: 13.10.2016
* Time: 22:17
*/
class PHPFileRegionalizedTextProvider implements RegionalizedTextProvider
{
/**
* @var array
*/
protected $textsArray;
public function __construct($locale) {
$filePath = rtrim(__DIR__,'/') . '/resources/localized_strings.' . $locale . '.php';
if (file_exists($filePath) && is_readable($filePath) && is_file($filePath)) {
$this->textsArray = include($filePath);
}
}
public function getRegionalizedText($name)
{
return array_key_exists($name,$this->textsArray) ? $this->textsArray[$name] : $name;
}
}