question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

format-relative helper displays in English regardless of current locale

See original GitHub issue
  • I am on the latest ember-intl version
  • I have searched the issues of this repo and believe that this is not a duplicate

Environment

  • Ember Version: 3.4.1
  • Ember CLI Version: 3.4.3
  • Ember Intl Version: 3.5.0
  • Browser(s): Chrome
  • Node Version: 8.12.0

Steps to Reproduce

Using the format-date helper in template correctly translates date into set locale, however, the format-relative helper displays in English, regardless of set locale.

  {{format-date timestamp}} //outputs "14 janv. 2019" when locale set to 'fr-fr'
  {{format-relative timestamp}} //outputs "1 second ago" when locale set to 'fr-fr'

I attempted to recreate format-relative using Intl.RelativeTimeFormat as a test, which does translate to the relevant language (but doesn’t accept a date format as an argument).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
normanhazecommented, Jan 23, 2019

Could have sworn I restarted last time to no avail, but it seems to have worked this time. Apologies, and thanks for the help!

0reactions
jasonmitcommented, Jan 23, 2019

@normanhaze I appreciate that you circled back. This will likely help others in the future 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to customize date-fns's formatRelative? - Stack Overflow
An update on the accepted answer: it looks like in the latest version of date-fns , the ...
Read more >
What Is a Locale? - International Language Environment Guide
What Is a Locale? A key concept for application programs is that of a program's locale. The locale is an explicit model and...
Read more >
Diff - infra/third_party/npm_modules - Google Git
This means that if the current locale is set to English, only English formats will be parsed when Date#create does not specify a...
Read more >
A simple PHP API extension for DateTime. - Carbon
Carbon - A simple PHP API extension for DateTime.
Read more >
SC READY and SCPASS Score Report User Guide for Use ...
English Language Arts (ELA) and mathematics administered to students in grades 3–8 ... scale score value shows the same amount of achievement, regardless...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found