diff --git a/l18n b/l18n index 4b2c9ff..38c989b 160000 --- a/l18n +++ b/l18n @@ -1 +1 @@ -Subproject commit 4b2c9ffee40ae15164b282177faabde441271821 +Subproject commit 38c989b971471a0b69fe486cedf1d35587640ce8 diff --git a/src/MDCurrenciesSet.php b/src/MDCurrenciesSet.php new file mode 100644 index 0000000..cf5f2fb --- /dev/null +++ b/src/MDCurrenciesSet.php @@ -0,0 +1,39 @@ + + */ + +/** + * Class containing available currencies. + */ +class MDCurrenciesSet extends MDValueSet { + + const CURRENCIES = [ + '', + "de-DM", + "de-RM", + "es-Real", + "eu-EUR", + "id-IDR", + "hu-Ft", + 'hu-Lari', + 'hu-Pengő', + "pl-Złoty", + "us-USD", + ]; + + /** + * Gets a list of the entries in a translated version. + * + * @param MDTlLoader $tlLoader Translation loader. + * + * @return array + */ + public static function getSortedList(MDTlLoader $tlLoader):array { + return parent::getTlSortedList($tlLoader, self::CURRENCIES, "currencies_set", "currencies_set"); + + } + +} diff --git a/src/MDValueSet.php b/src/MDValueSet.php index 5a0008e..f1c50c7 100644 --- a/src/MDValueSet.php +++ b/src/MDValueSet.php @@ -24,7 +24,8 @@ class MDValueSet { $output = []; foreach ($keyList as $tID) { - $output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID); + if ($tID === "") $output[$tID] = ""; + else $output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID); } asort($output);