mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
implement static localization generation
This commit is contained in:
parent
8710adad62
commit
8b2b509c5c
|
|
@ -160,6 +160,24 @@ class Localization
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create localization from language code
|
||||
*
|
||||
* @param string $langCode Language code
|
||||
* @param string $countryCode Country code
|
||||
*
|
||||
* @return Localization
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function fromLanguage(string $langCode, string $countryCode = '*') : self
|
||||
{
|
||||
$l11n = new self();
|
||||
$l11n->loadFromLanguage($langCode, $countryCode);
|
||||
|
||||
return $l11n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load localization from language code
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user