Skip to content

Commit

Permalink
fix: Not all namespaces are loaded when passing the lng option to use…
Browse files Browse the repository at this point in the history
…Translate #1809
  • Loading branch information
adrai committed Nov 7, 2024
1 parent 2934253 commit 0d8153e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 15.1.1

- fix: Not all namespaces are loaded when passing the lng option to useTranslate [1809](https://github.com/i18next/next-i18next/issues/1809)

### 15.1.0

- fix: `<Trans />` warns 'Each child in a list should have a unique "key" prop.' for react 19 [1806](https://github.com/i18next/next-i18next/pull/1806)
Expand Down
1 change: 1 addition & 0 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
};
const loadLanguages = (i18n, lng, ns, cb) => {
if (isString(ns)) ns = [ns];
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
ns.forEach(n => {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
Expand Down
Loading

0 comments on commit 0d8153e

Please sign in to comment.