Closed mrflix closed 3 years ago
I usually set the locale as an array because the the German numeric comma breaks stuff (padding-bottom: 80,12565% - fun):
'locale' => [ LC_COLLATE => 'de_CH.utf-8', LC_MONETARY => 'de_CH.utf-8', LC_NUMERIC => 'en_US.utf-8', LC_TIME => 'de_CH.utf-8', LC_MESSAGES => 'de_CH.utf-8', LC_CTYPE => 'de_CH.utf-8' ];
This however breaks https://github.com/wagnerwagner/merx/blob/43e9b8ddf195b1a6f540319dd49cda1de074a1b7/src/merx.php#L41 where a string is expected.
My workaround which you're free to include:
$str = option('locale'); if (is_array($str)){ $str = $str[1]; } $locale = substr($str, 0, 5);
Though I'm also thinking: doesn't Kirby already set the locale even if its in single language mode?
Two more places where this breaks:
https://github.com/wagnerwagner/merx/blob/43e9b8ddf195b1a6f540319dd49cda1de074a1b7/src/merx.php#L175
and
https://github.com/wagnerwagner/merx/blob/43e9b8ddf195b1a6f540319dd49cda1de074a1b7/src/cart.php#L122
Fixed in 1.5.0-rc.1
Sweet ❤️
I usually set the locale as an array because the the German numeric comma breaks stuff (padding-bottom: 80,12565% - fun):
This however breaks https://github.com/wagnerwagner/merx/blob/43e9b8ddf195b1a6f540319dd49cda1de074a1b7/src/merx.php#L41 where a string is expected.
My workaround which you're free to include:
Though I'm also thinking: doesn't Kirby already set the locale even if its in single language mode?