I18next: Interpolation formatting when format contains formatseparator

Created on 14 Jul 2016  路  3Comments  路  Source: i18next/i18next

See this line: https://github.com/i18next/i18next/commit/d3cc9ba8ab3a81d472c0ef3dca56392fae492f47#diff-e171f9b8b4e0f5df027bd8bd7b962f1bR1230

I use : as formatSeparator.
My translationfile contains: key: "It is now {date:dd/MM/yyyy HH:mm}"

This is the output for i18next.t("key", new Date()):

It is now 17/07/2016 10

As you can see, due to string.split() on formatseparator, everything after the second : is dropped.

Most helpful comment

Again, brilliant. I'm now getting It is now 17/07/2016 10:13

:shipit:

All 3 comments

ok will provide a patch asap

Again, brilliant. I'm now getting It is now 17/07/2016 10:13

:shipit:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaxLeiter picture MaxLeiter  路  6Comments

balazsorban44 picture balazsorban44  路  5Comments

obedm503 picture obedm503  路  3Comments

dmorrison42 picture dmorrison42  路  7Comments

salvador-dali picture salvador-dali  路  7Comments