This repository was archived by the owner on Mar 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,25 @@ Notice that the above path to the locales does not have a trailing slash.
2323The plugin will do a trailing slash check when defining the path, so you
2424may include it or not.
2525
26+ ### Loading additional namespaces
27+
28+ With i18next you can load multiple namespaces and refer to them when
29+ calling translate with a key (for example i18next.t("namespace: key ").
30+
31+ This plugin gives you the option to load additional namespaces
32+ immediately when loading a locale by doing:
33+
34+ ``` javascript
35+ require ([" some/module" , " i18n!path/to/locales:namespace1,namespace2" ],
36+ function (module , i18n ) {
37+ // The additional namespaces "namespace1" and "namespace2" are
38+ // now loaded and ready for use
39+ }
40+ );
41+ ```
42+ NOTE: when using the supportedLngs option mentioned below, be sure to
43+ add this additional namespaces to the list of supported namespaces.
44+
2645## Configuration
2746
2847### Plugin setup
@@ -120,4 +139,4 @@ used as supported languages.
120139
121140## License
122141
123- This project is released under the MIT license.
142+ This project is released under the MIT license.
You can’t perform that action at this time.
0 commit comments