Skip to content

Commit

Permalink
pass correct language for custom i18nFormat i18next/i18next-icu#67
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Aug 25, 2023
1 parent 76f89b0 commit 77bbc0a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 23.4.6

- pass correct language for custom i18nFormat

## 23.4.5

- types: named export for FlatNamespace
Expand Down
2 changes: 1 addition & 1 deletion i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@
res = this.i18nFormat.parse(res, {
...this.options.interpolation.defaultVariables,
...options
}, resolved.usedLng, resolved.usedNS, resolved.usedKey, {
}, options.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {
resolved
});
} else if (!options.skipInterpolation) {
Expand Down
2 changes: 1 addition & 1 deletion i18next.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class Translator extends EventEmitter {
res = this.i18nFormat.parse(
res,
{ ...this.options.interpolation.defaultVariables, ...options },
resolved.usedLng,
options.lng || this.language || resolved.usedLng,
resolved.usedNS,
resolved.usedKey,
{ resolved },
Expand Down

0 comments on commit 77bbc0a

Please sign in to comment.