mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-11-16 14:57:35 +00:00
feat: localize currency drop-down options
Enhanced the currency drop-down to display localized names if available. This improves user experience by showing familiar names in their local language. Ensures the default language is used if localization isn't specified.
This commit is contained in:
parent
e983660b55
commit
9c7db1013e
1 changed files with 3 additions and 2 deletions
|
@ -136,10 +136,11 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
|
|||
<select class="input-group-text cursor-pointer" id="selectBox" onchange="xmrConvert(this.value)" aria-label="<?php echo $l_fiatSelect; ?>">
|
||||
<?php
|
||||
if (isset($xmr_in)) {
|
||||
echo '<option value="' . $xmr_in . '">' . $xmr_in . '</option>';
|
||||
echo '<option value="' . $xmr_in . '">' . (isset(${"l_" . strtolower($xmr_in)}) ? ${"l_" . strtolower($xmr_in)} : $xmr_in) . '</option>';
|
||||
}
|
||||
foreach ($currencies as $currency) {
|
||||
echo "<option value=\"{$currency}\">{$currency}</option>";
|
||||
$currencyName = isset(${"l_" . strtolower($currency)}) ? ${"l_" . strtolower($currency)} : $currency;
|
||||
echo "<option value=\"{$currency}\">{$currencyName}</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
|
Loading…
Reference in a new issue