Log message #4203620

# At Username Text
# Sep 17th 2019, 15:11 neon1024 Sure sounds like a good plan :thumbsup:
# Sep 17th 2019, 15:08 spriz should I make my own `CustomDecimalType` and enable the locale parser, and use that one in `_initializeSchema()` ?
# Sep 17th 2019, 15:07 spriz I would like to use only the `localeParser` features of `DecimalType` in 1 table at a time - what is the best approach here?
# Sep 17th 2019, 15:05 ricksaccous with a vision
# Sep 17th 2019, 15:05 ricksaccous the man with a Vue
# Sep 17th 2019, 15:03 spriz if one wants to tinker with frontend
# Sep 17th 2019, 15:02 spriz Uh, nice :)
# Sep 17th 2019, 15:02 neon1024 Doing Vue.js this week :slightly_smiling_face:
# Sep 17th 2019, 15:02 spriz in case anyone stumbles upon it: https://gist.github.com/Spriz/9a328c0392ce7dfa674e07ceda7ceb12
# Sep 17th 2019, 15:02 neon1024 Although I’m mostly on internal tooling these days
# Sep 17th 2019, 15:01 neon1024 I’ve done one site so far and it was quite a fun challenge
# Sep 17th 2019, 15:01 neon1024 We’re fully Brexit and don’t do any multi-lingual sites :face_palm:
# Sep 17th 2019, 15:01 spriz but adding `en_GB` is a matter of adding a `.po` file and adding the record to our bootstrap.php :P
# Sep 17th 2019, 15:00 spriz only `da_DK`, `en_US`, and `de_DE`
# Sep 17th 2019, 15:00 neon1024 Noice!
# Sep 17th 2019, 15:00 spriz we don't currently :)
# Sep 17th 2019, 15:00 neon1024 Oh, how do you select beween en_GB and en_US?
# Sep 17th 2019, 15:00 spriz or welp, we do it in a Middleware
# Sep 17th 2019, 14:59 spriz depending on the user's selected language
# Sep 17th 2019, 14:59 spriz we do that :)
# Sep 17th 2019, 14:59 neon1024 Unless maybe you want to change locale during execution for some reason
# Sep 17th 2019, 14:59 spriz set ALL the locales!
# Sep 17th 2019, 14:59 spriz ``` ini_set('intl.default_locale', $locale); I18n::setLocale($locale); FrozenTime::setDefaultLocale($locale); Time::setDefaultLocale($locale); FrozenDate::setDefaultLocale($locale); Date::setDefaultLocale($locale); ```
# Sep 17th 2019, 14:59 neon1024 Yeah, that doesn’t seem right :thinking_face:
# Sep 17th 2019, 14:58 spriz so if I did `I18n::setLocale($locale)` and then `Number::parseFloat()` it would read another locale from `ini_get()`
# Sep 17th 2019, 14:58 neon1024 Ooh, so might be worth trying to contribute a failing test for that
# Sep 17th 2019, 14:58 spriz @neon1024 ^
# Sep 17th 2019, 14:58 spriz Aha, what surprised me was that rather than using `I18n::getLocale()`, some of the code actually reads directly from `ini_get('intl.default_locale')` rather :shrug:
# Sep 17th 2019, 14:32 neon1024 Usually in these cases I get myself in a muddle ;)
# Sep 17th 2019, 14:32 peppejaripappalardo @neon1024 thx
# Sep 17th 2019, 14:32 neon1024 Perhaps the test-cases would give you more of an idea of the expected functionality
# Sep 17th 2019, 14:31 spriz I am not sure if it is a bug, or if it just me expecting weirdo things
# Sep 17th 2019, 14:31 neon1024 Sounds like a good test-case :slightly_smiling_face:
# Sep 17th 2019, 14:31 spriz (which both of those methods fall back to in case nothing is set already)
# Sep 17th 2019, 14:31 neon1024 `parseFloat(format())` ?
# Sep 17th 2019, 14:30 spriz just using `intl.defaultlocale`
# Sep 17th 2019, 14:30 spriz yeah but without any arguments
# Sep 17th 2019, 14:30 neon1024 As they might be converted into any format
# Sep 17th 2019, 14:30 neon1024 I would expect that strings produced by `format()` wouldn’t be immediatly compatible
# Sep 17th 2019, 14:28 spriz Am I wrong in expecting the `Number::parseFloat()` should accept the same format/locale stuff as something generated by `Number::format()` ,:) :cold_sweat:
# Sep 17th 2019, 14:27 neon1024 You’ll probably find that some of your existing dependancies do not allow 4.x release versions