@@ -5,18 +5,21 @@ title: requirejs-dplugins/i18n
5
5
6
6
# requirejs-dplugins/i18n
7
7
8
- ` requirejs-dplugins/i18n ` is a [ requirejs plugin] ( http://requirejs.org/docs/plugins.html ) which provides support for
8
+ ` requirejs-dplugins/i18n ` is a [ RequireJS plugin] ( http://requirejs.org/docs/plugins.html ) which provides support for
9
9
localized string.
10
10
11
11
##### Table of Contents
12
- [ Differences with requirejs i18n] ( #differences-with-requirejs-i18n )
13
- [ Creating an i18n bundle] ( #creating-an-i18n-bundle )
14
- [ Using an i18n bundle] ( #using-an-i18n-bundle )
15
- [ Building i18n bundles] ( #building-i18n-bundles )
12
+ [ Differences with RequireJS i18n plugin ] ( #differences-with-requirejs-i18n-plugin )
13
+ [ Creating an i18n bundle] ( #creating-an-i18n-bundle )
14
+ [ Using an i18n bundle] ( #using-an-i18n-bundle )
15
+ [ Building i18n bundles] ( #building-i18n-bundles )
16
16
17
- ## Differences with requirejs i18n
17
+ ## Differences with RequireJS i18n plugin
18
18
19
- This plugin changes the way i18n bundles are built. While requirejs i18n adds bundles of a specified locale to the layer,
19
+ If an application is not built, this plugin will behave exactly like RequireJS i18n plugin.
20
+ The only difference is the way they build i18n bundles.
21
+
22
+ While RequireJS i18n plugin adds bundles of a specified locale to the layer,
20
23
` requirejs-dplugins/i18n ` will create specific nls layers for each locale specified in the ` localesList ` option. The
21
24
plugin will then load the appropriate nls layer depending on the user locale.
22
25
@@ -114,7 +117,7 @@ And the following directory structure:
114
117
#### Notes:
115
118
* The plugin uses the browser's ` navigator.language ` or ` navigator.userLanguage ` property to determine the required
116
119
locale. Then it selects the most suitable locale from the root bundle. The locale can also be set using
117
- requirejs config:
120
+ RequireJS config:
118
121
```
119
122
require.config({
120
123
config: {
0 commit comments