From: Vincent Vanwaelscappel Date: Wed, 11 Dec 2019 18:00:12 +0000 (+0100) Subject: wip #3262 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ee0ff1ac443542c550701eabe20e4b7bb8571074;p=cubist_locale.git wip #3262 @0.5 --- diff --git a/src/LocalizedList.php b/src/LocalizedList.php index c646725..9924b1e 100644 --- a/src/LocalizedList.php +++ b/src/LocalizedList.php @@ -37,4 +37,13 @@ class LocalizedList $res = include $f; return $res; } + + public static function translate($code, $locale) + { + $list = self::getList($locale); + if (isset($list[$code])) { + return $list[$code]; + } + return null; + } }