Chatbox day indicator not correctly formatted, according to the i18n configuration
See original GitHub issueDescribe the bug
The date that is shown at the top of a chat box is not being correctly formatted according to the i18n configuration. Using i18n = 'pt-BR'
I expected the date to be formatted in brazilian portuguese language, but it’s being formatted in english.
To Reproduce Steps to reproduce the behavior:
- Open conversejs with
i18n: 'pt_BR'
configuration - Open a chatbox that has a message and look at the day indicator
Expected behavior
I expected the day indicator to be localized with the locale configured with i18n
.
Screenshots
Environment (please complete the following information):
- Desktop or Mobile? = Desktop
- Browser [e.g. Chrome, Firefox] = Chrome Version 86.0.4240.75
- Converse.js version = 6.0.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Converting between 12 hour and 24 hour clock with i18n in ...
I ended up solving the simplified problem of choosing between 12 and 24 hour time using separate handlebars dates with I18n.l.
Read more >Rails Internationalization (I18n) API - Ruby on Rails Guides
Every string inside Rails is internationalized in this way, see for instance Active Model validation messages in the activemodel/lib/active_model/locale/en. ...
Read more >How to Localize a Svelte App with svelte-i18n | Phrase
Svelte-i18n is a light wrapper around FormatJS that uses Svelte stores to provide a no-frills i18n solution. Learn how to use it.
Read more >8.4.4 Patch Resolved Issues - Pega Documentation
has been resolved by adding code to set the correct context for ... Investigation showed that the busy indicator was not set to....
Read more >React i18n: A step-by-step guide to React-intl - Lokalise Blog
In fact, localization goes beyond translation. With localization, you can customize not only the language preference but also number formats ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like DayJS doesn’t get initialized with the right locale, or perhaps initialized too late.
Here’s where it gets initialized: https://github.com/conversejs/converse.js/blob/e49f97472a797c9722e5b51f65c159dc6ca1bb14/src/i18n/index.js#L81
@guusdk: Maybe this is something that @bernard-ng could take a look at?
Oh my bad, let me try it