i18next 21.3.3 → 21.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md DELETED
@@ -1,1419 +0,0 @@
1
- ## 21.3.3
2
-
3
- - apply default interpolation formatter when interpolation options don't specify one [1680](https://github.com/i18next/i18next/issues/1680)
4
-
5
- ## 21.3.2
6
-
7
- - formatter typescript declarations [1679](https://github.com/i18next/i18next/pull/1679)
8
-
9
- ## 21.3.1
10
-
11
- - get rid of internal isDummy check to prevent react-native issue [1675](https://github.com/i18next/i18next/issues/1675)
12
-
13
- ## 21.3.0
14
-
15
- - adds support for formats provided by Intl API (number, currency, datetime, relativedate, list)
16
-
17
- ## 21.2.6
18
-
19
- - optimize do skip natural language detection also if user provided nsSeparator option is passed via direct options
20
-
21
- ## 21.2.5
22
-
23
- - do skip natural language detection also if user provided nsSeparator option is passed [1665](https://github.com/i18next/i18next/issues/1665)
24
-
25
- ## 21.2.4
26
-
27
- - optimize Intl api check
28
-
29
- ## 21.2.3
30
-
31
- - fix Intl.PluralRules fallback
32
-
33
- ## 21.2.2
34
-
35
- - log error if Intl.PluralRules API is not available
36
-
37
- ## 21.2.1
38
-
39
- - do skip natural language detection, if user provided keySeparator option is passed [1670](https://github.com/i18next/i18next/issues/1670)
40
-
41
- ## 21.2.0
42
-
43
- - provide bundled esm distributable [1667](https://github.com/i18next/i18next/issues/1667)
44
-
45
- ## 21.1.1
46
-
47
- - optimize natural language detection [1661](https://github.com/i18next/i18next/issues/1661)
48
-
49
- ## 21.1.0
50
-
51
- - A new RTL support added for `ckb` language code
52
-
53
- ## 21.0.2
54
-
55
- - fix defaultNS regression if translation namespace is defined in ns option, fixes #1658
56
-
57
- ## 21.0.1
58
-
59
- - fix typescript typo for skipOnVariables
60
-
61
- ## 21.0.0
62
-
63
- **This is a major breaking release:**
64
-
65
- - introduce new v4 json format (intl plural forms with ordinal support), simplifyPluralSuffix not used anymore
66
- - `skipOnVariables` by default now is true
67
- - automatically detect natural language keys (no need to set nsSeparator or keySeparator to false)
68
- - remove deprecated whitelist features
69
- - introduce new i18next.resolvedLanguage property
70
-
71
- ➡️ check out the [migration guide](https://www.i18next.com/misc/migration-guide#v-20-x-x-to-v-21-0-0)
72
-
73
- ## 20.6.1
74
-
75
- - fix deepFind if looking for nesting array item
76
-
77
- ## 20.6.0
78
-
79
- - feature: key prefix option [1644](https://github.com/i18next/i18next/pull/1644)
80
-
81
- ## 20.5.0
82
-
83
- - introduce missingKeyNoValueFallbackToKey option
84
-
85
- ## 20.4.0
86
-
87
- - change to return false when a nullable argument is passed [1635](https://github.com/i18next/i18next/pull/1635)
88
- - make sure parseMissingKeyHandler is called when defaultValue is provided [1354](https://github.com/i18next/react-i18next/issues/1354)
89
- - types: Fix i18n.use() cannot pass module constructors in TypeScript [1442](https://github.com/i18next/i18next/pull/1442)
90
- - types: fix TypeScript definition for "loaded" event handler [1637](https://github.com/i18next/i18next/issues/1637)
91
-
92
- ## 20.3.5
93
-
94
- - change init warning to only trigger if not using useSSR on react-i18next
95
-
96
- ## 20.3.4
97
-
98
- - fix(types): only use readonly array of strings in API [1629](https://github.com/i18next/i18next/pull/1629)
99
-
100
- ## 20.3.3
101
-
102
- - add transWrapTextNodes to types [1626](https://github.com/i18next/i18next/pull/1626)
103
-
104
- ## 20.3.2
105
-
106
- - context can also be a number [1622](https://github.com/i18next/i18next/issues/1622)
107
-
108
- ## 20.3.1
109
-
110
- - add 'ns' to the 'returnedObjectHandler' options [1619](https://github.com/i18next/i18next/pull/1619)
111
- - disable warn 'accessing an object' when the 'returnedObjectHandler' is defined [1617](https://github.com/i18next/i18next/pull/1617)
112
-
113
- ## 20.3.0
114
-
115
- - add simple toJSON function to fix uncontrolled serialization, fixes [1322](https://github.com/i18next/react-i18next/issues/1322)
116
-
117
- ## 20.2.4
118
-
119
- - fix types for LanguageDetector detect function
120
-
121
- ## 20.2.3
122
-
123
- - if detected lng is falsy, set it to empty array, to make sure at least the fallbackLng will be used
124
-
125
- ## 20.2.2
126
-
127
- - fix plural equations for Kazakh [1608](https://github.com/i18next/i18next/pull/1608)
128
-
129
- ## 20.2.1
130
-
131
- - fix lastIndex in regex when skipOnVariables is true
132
-
133
- ## 20.2.0
134
-
135
- - add ignoreJSONStructure into the types
136
- - stop recursive interpolation also for "{{variable}}" when skipOnVariables is true [1595](https://github.com/i18next/i18next/issues/1595)
137
- - old browser fix for "includes" usage [1597](https://github.com/i18next/i18next/pull/1597)
138
-
139
- ## 20.1.0
140
-
141
- - Add alwaysFormat into the types [1586](https://github.com/i18next/i18next/pull/1586)
142
- - Add interpolation key name to format function [1571](https://github.com/i18next/i18next/pull/1571)
143
-
144
- ## 20.0.0
145
-
146
- - add support to proper augment PluginOptions type [1583](https://github.com/i18next/i18next/pull/1583)
147
- - introduce ignoreJSONStructure flag, to automatically lookup for a flat key if a nested key is not found an vice-versa [1584](https://github.com/i18next/i18next/pull/1584) (MAJOR: because of ignoreJSONStructure is true by default)
148
-
149
- ## 19.9.2
150
-
151
- - try to fix another edge case issue [1570](https://github.com/i18next/i18next/issues/1570) introduces by fixing [1552](https://github.com/i18next/i18next/issues/1552)
152
-
153
- ## 19.9.1
154
-
155
- - Fallback on singular defaultValue [1563](https://github.com/i18next/i18next/pull/1563)
156
-
157
- ## 19.9.0
158
-
159
- - Improve updateMissing default plural behavior [1558](https://github.com/i18next/i18next/pull/1558)
160
- - typescript: type definitions improvements for backend [1560](https://github.com/i18next/i18next/pull/1560)
161
-
162
- ## 19.8.10
163
-
164
- - try to fix another edge case issue [1570](https://github.com/i18next/i18next/issues/1570) introduces by fixing [1552](https://github.com/i18next/i18next/issues/1552)
165
-
166
- ## 19.8.9
167
-
168
- - warn if i18next gets initialized multiple times
169
-
170
- ## 19.8.8
171
-
172
- - fix for cases when calling changeLanguage before finished to initialize [1552](https://github.com/i18next/i18next/issues/1552)
173
-
174
- ## 19.8.7
175
-
176
- - use "Object.prototype.hasOwnProperty" instead of "object.hasOwnProperty", fixes [1542](https://github.com/i18next/i18next/issues/1542)
177
-
178
- ## 19.8.6
179
-
180
- - regression fix because of last prototype pollution fix in v19.8.5
181
-
182
- ## 19.8.5
183
-
184
- - fix potential prototype pollution when backend plugin resolves a malicious language value
185
- - use fallbackLng as default lng
186
-
187
- ## 19.8.4
188
-
189
- - update format function signature for TS [1520](https://github.com/i18next/i18next/pull/1480))
190
-
191
- ## 19.8.3
192
-
193
- - fix prototype pollution with constructor
194
-
195
- ## 19.8.2
196
-
197
- - allow nesting recursively with context (could theoretically generate infinite loop, prevented in [1480](https://github.com/i18next/i18next/pull/1480))
198
-
199
- ## 19.8.1
200
-
201
- - fix "no languageDetector is used" log statement
202
- - do not log "initialized" on cloned instances
203
-
204
- ## 19.8.0
205
-
206
- - allow fallbackLng as function [1508](https://github.com/i18next/i18next/pull/1508)
207
-
208
- ## 19.7.0
209
-
210
- - resource manipulation functions are now chainable
211
-
212
- ## 19.6.3
213
-
214
- - plural rules for ht and iw
215
-
216
- ## 19.6.2
217
-
218
- - fix interpolation with option skipOnVariables when there are multiple placeholders [1490](https://github.com/i18next/i18next/issues/1490)
219
-
220
- ## 19.6.1
221
-
222
- - extend interpolation option skipOnVariables [1488](https://github.com/i18next/i18next/pull/1488)
223
- - typescript: Change bindStore to bindI18nStore in ReactOptions type and update default values [1489](https://github.com/i18next/i18next/pull/1489)
224
-
225
- ## 19.6.0
226
-
227
- - fix prototype pollution
228
- - introduce new interpolation option skipOnVariables [1483](https://github.com/i18next/i18next/pull/1483)
229
-
230
- ## 19.5.6
231
-
232
- - fix local usage of nsSeparator option
233
-
234
- ## 19.5.5
235
-
236
- - fix: recursion when passing nesting to interpolated [1480](https://github.com/i18next/i18next/pull/1480)
237
-
238
- ## 19.5.4
239
-
240
- - typescript fix: getDataByLanguage typings & test [1472](https://github.com/i18next/i18next/pull/1472)
241
- - typescript fix: type declarion of exposed EventEmitter#off methods [1460](https://github.com/i18next/i18next/pull/1460)
242
-
243
- ## 19.5.3
244
-
245
- - fix Macedonian plural formula [1476](https://github.com/i18next/i18next/pull/1476)
246
-
247
- ## 19.5.2
248
-
249
- - fix nesting interpolation with prepended namespace, fixes #1474 [1475](https://github.com/i18next/i18next/pull/1475)
250
-
251
- ## 19.5.1
252
-
253
- - getBestMatchFromCodes: use fallbackLng if nothing found, fixes #1470 [1471](https://github.com/i18next/i18next/pull/1471)
254
-
255
- ## 19.5.0
256
-
257
- - language detectors can return an array of languages and let i18next figure out best match
258
-
259
- - rename option whitelist to supportedLngs
260
- - rename option nonExpicitWhitelist to nonExplicitSupportedLngs
261
- - rename function languageUtils.isWhitelisted to languageUtils.isSupportedCode
262
-
263
- This changes are made with temporal backwards compatiblity and will warn your for deprecated usage of old terms to give users and plugin providers some time to adapt their code base.
264
-
265
- The temporal backwards compatiblity will be removed in a follow up major release.
266
-
267
- Learn more about why this change was made [here](https://github.com/i18next/i18next/issues/1466).
268
-
269
- ## 19.4.5
270
-
271
- - Add store events to typings [1451](https://github.com/i18next/i18next/pull/1451)
272
-
273
- ## 19.4.4
274
-
275
- - typescript: Allow passing retry boolean to `ReadCallback` [1439](https://github.com/i18next/i18next/pull/1439)
276
-
277
- ## 19.4.3
278
-
279
- - fix regression introduced in "support formatting in nesting" [1419](https://github.com/i18next/i18next/pull/1419)
280
-
281
- ## 19.4.2
282
-
283
- - fix for deno [1428](https://github.com/i18next/i18next/pull/1428)
284
-
285
- ## 19.4.1
286
-
287
- - add getLanguagePartFromCode as in language fallback resolution [1424](https://github.com/i18next/i18next/pull/1424)
288
-
289
- ## 19.4.0
290
-
291
- - support formatting in nesting [1419](https://github.com/i18next/i18next/pull/1419)
292
-
293
- ## 19.3.4
294
-
295
- - fix cloning of service.utils binding to clone [1415](https://github.com/i18next/i18next/pull/1415)
296
-
297
- ## 19.3.3
298
-
299
- - backendConnector extend initial retry from 250 to 350
300
-
301
- ## 19.3.2
302
-
303
- - fix the nested string options parsing introduced in v19.2.0 which broke having multiple options
304
-
305
- ## 19.3.1
306
-
307
- - typescript: add `options.interpolation.nestingOptionsSeparator`
308
-
309
- ## 19.3.0
310
-
311
- - Double fix for 1395 issue [1399](https://github.com/i18next/i18next/pull/1399)
312
- - adds `options.interpolation.nestingOptionsSeparator: ','` to specify that separator
313
-
314
- ## 19.2.0
315
-
316
- - Add ability to use commas in nested keys [1398](https://github.com/i18next/i18next/pull/1398)
317
-
318
- ## 19.1.0
319
-
320
- - explict warning when no languageDetector is used and no lng is defined [1381](https://github.com/i18next/i18next/pull/1381)
321
- - Add option to always format interpolated values [1385](https://github.com/i18next/i18next/pull/1385)
322
- - pass all options to format function [992#issuecomment-577797162](https://github.com/i18next/i18next/issues/992#issuecomment-577797162)
323
-
324
- ## 19.0.3
325
-
326
- - fixes retry interval in backend connector [1378](https://github.com/i18next/i18next/issues/1378)
327
-
328
- ## 19.0.2
329
-
330
- - typescript: Type ResourceStore [1366](https://github.com/i18next/i18next/pull/1366)
331
-
332
- ## 19.0.1
333
-
334
- - ignore non valid keys in saveMissing [1359](https://github.com/i18next/i18next/pull/1359)
335
-
336
- ## 19.0.0
337
-
338
- - typescript: Typescript use `export default` for esm-first approach [1352](https://github.com/i18next/i18next/pull/1352)
339
-
340
- ## 18.0.1
341
-
342
- - check loadedNamespace only once per lng-ns inside using `t` for better performance
343
-
344
- ## 18.0.0
345
-
346
- - When calling `i18next.changeLanguage()` both `i18next.language` and `i18next.languages` will be set to the new language after calling `loadResources` -> means when accessing `t` function meanwhile you will get still the translations for the previous language instead of the fallback.
347
-
348
- - **When is this breaking?** this does not break any current test - but if you depend on accessing i18next.language or i18next.dir during language change and expect the new language this will break your app.
349
-
350
- - Reasoning: In react-i18next we get in a not ready state for loaded translations while we would prefer just waiting for the new language ready and trigger a rerender then - also a triggered rerender outside of the bound events would end in Suspense...
351
-
352
- - How can I get the language i18next will be set to? `i18next.isLanguageChangingTo` is set to the language called
353
-
354
- ## 17.3.1
355
-
356
- - typescript: Add missing `cleanCode` option to TypeScript def [1344](https://github.com/i18next/i18next/pull/1344)
357
-
358
- ## 17.3.0
359
-
360
- - pass used language & namespace to postprocessor [1341](https://github.com/i18next/i18next/pull/1341)
361
-
362
- ## 17.2.0
363
-
364
- - Support using ImmutableJS Records as the data model in interpolation [1339](https://github.com/i18next/i18next/pull/1339)
365
-
366
- ## 17.1.0
367
-
368
- DX improvements:
369
-
370
- - warning if accessing t before i18next was initialized or namespace loaded
371
- - warning and cancelling save if saveMissing key before i18next was initialized or namespace loaded
372
-
373
- Both are a clear sign you render your app / call t to early not waiting for the callbacks or Promise.resolve on i18next.init, i18next.loadNamespace or i18next.changeLanguage.
374
-
375
- ## 17.0.18
376
-
377
- - Improve performance of EventEmitter.off [1333](https://github.com/i18next/i18next/pull/1333)
378
-
379
- ## 17.0.17
380
-
381
- - fixes: missing nested key fails if no nested value found and defaultValue contains interpolation -> results in endless loop [1332](https://github.com/i18next/i18next/issues/1332)
382
-
383
- ## 17.0.16
384
-
385
- - typescript: fix incorrect callback type for backend module read callback [1322](https://github.com/i18next/i18next/pull/1322)
386
- - typescript: add getDataByLanguage into index.d.ts [1326](https://github.com/i18next/i18next/pull/1326)
387
-
388
- ## 17.0.15
389
-
390
- - Fixed default value as string in IE [1325](https://github.com/i18next/i18next/pull/1325)
391
-
392
- ## 17.0.14
393
-
394
- - typescript: Allow TFunction to receive 1-3 parameters [1317](https://github.com/i18next/i18next/pull/1317)
395
-
396
- ## 17.0.13
397
-
398
- - fixes: Interpolation defaultVariables not recognized on t() [1314](https://github.com/i18next/i18next/issues/1314)
399
-
400
- ## 17.0.12
401
-
402
- - remove unused Interpolator#init reset param (only used internally) [1313](https://github.com/i18next/i18next/pull/1313)
403
- - Cope with null interpolation (unescaped case) [1310](https://github.com/i18next/i18next/pull/1310)
404
-
405
- ## 17.0.11
406
-
407
- - fix issue with unset value in interpolation throwing exception
408
- - typescript: Allow augmentation of TFunction to be able to add overloads [1308](https://github.com/i18next/i18next/pull/1308)
409
-
410
- ## 17.0.10
411
-
412
- - Update Interpolator.js to use regexSafe for unescaped interpolation [1307](https://github.com/i18next/i18next/pull/1307)
413
-
414
- ## 17.0.9
415
-
416
- - typescript: use() should accept a class or object [1301](https://github.com/i18next/i18next/pull/1301)
417
-
418
- ## 17.0.8
419
-
420
- - typescript: Correct `use(module)` types [1296](https://github.com/i18next/i18next/pull/1296)
421
-
422
- ## 17.0.7
423
-
424
- - typescript: Typescript imports [1291](https://github.com/i18next/i18next/pull/1291)
425
- - Disabled default returnedObjectHandler [1288](https://github.com/i18next/i18next/pull/1288)
426
-
427
- ## 17.0.6
428
-
429
- - support montenegrien "crn" plurals
430
-
431
- ## 17.0.4
432
-
433
- - typescript: ResourceKey type should allow top level string value [1267](https://github.com/i18next/i18next/pull/1267)
434
-
435
- ## 17.0.3
436
-
437
- - don't do named exports for umd
438
-
439
- ## 17.0.2
440
-
441
- - typescript: Allow null as TResult [1263](https://github.com/i18next/i18next/pull/1263)
442
- - bring back ./i18next.js and ./i18next.min.js -> used by wildcard unpkg users...<= bad idea doing so
443
- - main export in package.json points to cjs dist
444
-
445
- ## 17.0.1
446
-
447
- - adapt ./index.js to 17.0.0 export
448
-
449
- ## 17.0.0
450
-
451
- - removes checking in build files (umd) into source code - for CDN usage use: [https://unpkg.com/i18next@16.0.0/dist/umd/i18next.js](https://unpkg.com/i18next@16.0.0/dist/umd/i18next.js)
452
- - removes named exports in main file - avoids issues in mixed exports makes usage better in commonjs scenarios (node.js) - no strange `const i18next = require('i18next').default;`
453
- - **impact** you can't no longer `import { changeLanguage } from 'i18next'; changeLanguage('de');` you will have to `import i18next from 'i18next'; i18next.changeLanguage('de');`
454
- - **note** if can create a own file providing the named bound functions and use that instead, sample: [https://github.com/i18next/i18next/blob/v15.0.0/src/index.js#L5](https://github.com/i18next/i18next/blob/v15.0.0/src/index.js#L5)
455
-
456
- ## 16.0.0
457
-
458
- - removes deprecated jsnext:main from package.json
459
- - Bundle all entry points with rollup [1256](https://github.com/i18next/i18next/pull/1256)
460
- - **note:** dist/es -> dist/esm, dist/commonjs -> dist/cjs (individual files -> one bundled file)
461
-
462
- ## 15.1.3
463
-
464
- - typescript: Fix type error when init with locize plugin options [1248](https://github.com/i18next/i18next/pull/1248)
465
-
466
- ## 15.1.2
467
-
468
- - typescript: types(ReactOptions): Add missing props to React Options interface [1247](https://github.com/i18next/i18next/pull/1247)
469
-
470
- ## 15.1.1
471
-
472
- - typescript: Update BackendModule interface to allow null or undefined for the callback [1244](https://github.com/i18next/i18next/pull/1244)
473
-
474
- ## 15.1.0
475
-
476
- - trigger a languageChanging event
477
-
478
- ## 15.0.9
479
-
480
- - IE: <=IE10 fix (unable to call parent constructor) [1227](https://github.com/i18next/i18next/pull/1227)
481
-
482
- ## 15.0.8
483
-
484
- - typescript: adding init function to 3rdParty module typings and enforcing type property [1223](https://github.com/i18next/i18next/pull/1223)
485
-
486
- ## 15.0.7
487
-
488
- - typescript: Add useSuspense to ReactOptions, fix error throwing on test [1219](https://github.com/i18next/i18next/pull/1219)
489
-
490
- ## 15.0.6
491
-
492
- - typescript: add Interpolator interface [1213](https://github.com/i18next/i18next/pull/1213)
493
-
494
- ## 15.0.5
495
-
496
- - typescript: Add `hashTransKey` to `ReactOptions` [1208](https://github.com/i18next/i18next/pull/1208)
497
- - Expose error on reloadResources [1212](https://github.com/i18next/i18next/pull/1212)
498
-
499
- ## 15.0.4
500
-
501
- - add default export on node.js entry [1204](https://github.com/i18next/i18next/pull/1204)
502
- - typescript: Add defaultValue tests and allow second arg string as defaultValue [1206](https://github.com/i18next/i18next/pull/1206)
503
-
504
- ## 15.0.3
505
-
506
- - typescript: accept templatestringsarray as TKey [1199](https://github.com/i18next/i18next/pull/1199)
507
- - allow arrays on addResources
508
-
509
- ## 15.0.2
510
-
511
- - try fixing UMD build
512
-
513
- ## 15.0.1
514
-
515
- - fix export name on global (typo)
516
-
517
- ## 15.0.0
518
-
519
- - update build process (while all test passes feeling more save making this a major release)
520
-
521
- ## 14.1.1
522
-
523
- - allow empty string for array join [1191](https://github.com/i18next/i18next/issues/1191)
524
-
525
- ## 14.1.0
526
-
527
- - support plurals in returning objecttree array [1196](https://github.com/i18next/i18next/issues/1196)
528
-
529
- ## 14.0.1
530
-
531
- - typescript: Parameterized use of TFunction fails while WithT use works [1188](https://github.com/i18next/i18next/pull/1188)
532
-
533
- ## 14.0.0
534
-
535
- - typescript: BREAKING Refactor generics usage [1180](https://github.com/i18next/i18next/pull/1180)
536
-
537
- ## 13.1.5
538
-
539
- - es modules: Fix bug when import by ES Module [1179](https://github.com/i18next/i18next/pull/1179)
540
- - typescript: Add module property [1176](https://github.com/i18next/i18next/pull/1176)
541
-
542
- ## 13.1.4
543
-
544
- - fixes plural rule for JSON compatibility v2 introduced in 11.3.3 https://github.com/i18next/i18next/commit/d4d329fd7042f932eedf8bba1d92234707efd04c#diff-e171f9b8b4e0f5df027bd8bd7b962f1bR1140 [1174](https://github.com/i18next/i18next/issues/1174)
545
-
546
- ## 13.1.3
547
-
548
- - TypeScript: Pull up WithT interface allowing for overrides [1172](https://github.com/i18next/i18next/pull/1172)
549
-
550
- ## 13.1.2
551
-
552
- - Add typescript testing [1165](https://github.com/i18next/i18next/pull/1165)
553
- - Add `transEmptyNodeValue` to `ReactOptions` [1166](https://github.com/i18next/i18next/pull/1166)
554
- - Run prettier on typescript files for easier diffing in PRs [1167](https://github.com/i18next/i18next/pull/1167)
555
-
556
- ## 13.1.1
557
-
558
- - fix init() attributes typings [1158](https://github.com/i18next/i18next/pull/1158)
559
-
560
- ## 13.1.0
561
-
562
- - Support interpolation for defaultValue as parameter [1151](https://github.com/i18next/i18next/pull/1151)
563
-
564
- ## 13.0.1
565
-
566
- - update typedefinitions [1152](https://github.com/i18next/i18next/pull/1152)
567
-
568
- ## 13.0.0
569
-
570
- - pass options to missingInterpolationHandler [1146](https://github.com/i18next/i18next/pull/1146)
571
- - refactor non valid keys handling [1143](https://github.com/i18next/i18next/pull/1143)
572
-
573
- BREAKING:
574
-
575
- - adds typescript definitions directly into this repo - no longer need to grab them from definitlytyped [1142](https://github.com/i18next/i18next/pull/1142)
576
- - promise API added for all functions providing a callback [1130](https://github.com/i18next/i18next/pull/1130) -> means those will now return a Promise and not this -> so you can't chain eg. i18next.init().on() anylonger as init returns a Promise
577
-
578
- ## 12.1.0
579
-
580
- - adds partialBundledLanguages flag in init options [1136](https://github.com/i18next/i18next/pull/1136)
581
-
582
- ## 12.0.0
583
-
584
- - add hebrew update [1121](https://github.com/i18next/i18next/pull/1121)
585
-
586
- ## 11.10.2
587
-
588
- - revert hebrew
589
-
590
- ## 11.10.1
591
-
592
- - Adds Hebrew plural support [1121](https://github.com/i18next/i18next/pull/1121)
593
-
594
- ## 11.10.0
595
-
596
- - Allow missingInterpolationHandler to be provided as t() option [1118](https://github.com/i18next/i18next/pull/1118)
597
-
598
- ## 11.9.1
599
-
600
- - fixes allow overriding of fallbackLng when in options passed to t functions call
601
-
602
- ## 11.9.0
603
-
604
- - merge load and reloadResources functionality to allow an optional callback in reloadResources
605
-
606
- ## 11.8.0
607
-
608
- - deeper support for i18nFormats - add getResource function from format
609
-
610
- ## 11.7.0
611
-
612
- - allows defining defaultValues for plurals -> same logic as using pluralsuffixes in translation files [details](https://www.i18next.com/translation-function/plurals#how-to-find-the-correct-plural-suffix) using eg. defaultValue_plural / defaultValue_2 based on request [1096](https://github.com/i18next/i18next/issues/1096)
613
-
614
- ## 11.6.0
615
-
616
- - expose new store function getDataByLanguage [1087](https://github.com/i18next/i18next/pull/1087)
617
-
618
- ## 11.5.0
619
-
620
- - EventEmitter.prototype.on returns this for chaining calls [1079](https://github.com/i18next/i18next/pull/1079)
621
-
622
- ## 11.4.0
623
-
624
- - Allow to pass raw value to the custom interpolation escape function [1076](https://github.com/i18next/i18next/pull/1076)
625
-
626
- ## 11.3.6
627
-
628
- - fix support zero for saveMissing plurals [1072](https://github.com/i18next/i18next/pull/1072)
629
-
630
- ## 11.3.5
631
-
632
- - trigger loaded event only once per loaded namespace - consolidate all the loaded and done queued load calls [react-i18next 456 ](https://github.com/i18next/react-i18next/issues/456)
633
-
634
- ## 11.3.4
635
-
636
- - fixes simplifyPluralSuffix: false cases for languages having only singular, plural [1069](https://github.com/i18next/i18next/issues/1069)
637
-
638
- ## 11.3.3
639
-
640
- - pass down resolved to i18nFormat.parse as last argument
641
-
642
- ## 11.3.2
643
-
644
- - Properly handle arguments containing arrays while listening to a wildcard event [1052](https://github.com/i18next/i18next/pull/1052)
645
-
646
- ## 11.3.1
647
-
648
- - Fixes allowing setting keySeparator to false in calling t function [1051](https://github.com/i18next/i18next/pull/1051)
649
-
650
- ## 11.3.0
651
-
652
- - Option to skip interpolation when calling t. [1050](https://github.com/i18next/i18next/pull/1050)
653
-
654
- ## 11.2.3
655
-
656
- - Remove unnecessary warning when value is empty string [1046](https://github.com/i18next/i18next/pull/1046)
657
-
658
- ## 11.2.2
659
-
660
- - adds used key to call parse of i18nFormat
661
-
662
- ## 11.2.1
663
-
664
- - fixes for i18nFormat plugin
665
-
666
- ## 11.2.0
667
-
668
- - allows new plugin of type 'i18nFormat' to override i18next format with eg. ICU format
669
-
670
- ## 11.0.0 - 11.1.1 (fixing version mismatch cdn.js - npm)
671
-
672
- - **[BREAKING]** removes plugin of type cache. Can be replace by [i18next-chained-backend](https://github.com/i18next/i18next-chained-backend) example cache for localStorage [i18next-localstorage-backend](https://github.com/i18next/i18next-localstorage-backend#getting-started)
673
- - **[BREAKING]** removes the support for multiload (multiRead) in backends - will just use read per language-namespace. You can enable multiRead support in backends again by using [i18next-multiload-backend-adapter](https://github.com/i18next/i18next-multiload-backend-adapter)
674
-
675
- ## 10.6.0
676
-
677
- - adds missingInterpolationHandler [1039](https://github.com/i18next/i18next/pull/1039)
678
-
679
- ## 10.5.1
680
-
681
- - fixes call to getPluralFormsOfKey if called with unsupported language [1032](https://github.com/i18next/i18next/issues/1032)
682
- - Avoid mutating whitelist array. [1037](https://github.com/i18next/i18next/pull/1037)
683
-
684
- ## 10.5.0
685
-
686
- - Adds options.silent to addResources and addResourceBundle [1024](https://github.com/i18next/i18next/pull/1024)
687
-
688
- ## 10.4.1
689
-
690
- - forward options in backend.create saveMissing
691
-
692
- ## 10.4.0
693
-
694
- - fixes combination of returnObject and context by returning original value for deep translation when lookup for inner returns a key (failed to translate proper) [1014](https://github.com/i18next/i18next/issues/1014)
695
- - _[EXPERIMENTAL]_ additional you can pass `tDescription` to the `t` options or as a third param to calling `t` -> `t(key, defaultValue, tDescription);`. Those will get forwarded to the backend and can be submitted on saveMissing to provide contextual information for translators.
696
-
697
- ## 10.3.0
698
-
699
- - new option saveMissingPlurals (default true) will enable submitting plural forms on saveMissing if t call is for plural (count passed in options).
700
-
701
- ## 10.2.2
702
-
703
- - fixes Context and nested lost initial options [1009](https://github.com/i18next/i18next/issues/1009)
704
-
705
- ## 10.2.1
706
-
707
- - optimize update output in log
708
-
709
- ## 10.2.0
710
-
711
- - _[EXPERIMENTAL]_ init option updateMissing: enable to update default values if different from translated value (only useful on initial development or when keeping code as source of truth not changing values outside of code)
712
-
713
- ## 10.1.0
714
-
715
- - return boolean, number from translator
716
- - initial set language on translator if non set yet (after that only if loaded) [#998](https://github.com/i18next/i18next/issues/998)
717
-
718
- ## 10.0.7
719
-
720
- - support all overloadTranslationOptionHandler in getFixedT [react-i18next/issues/332](https://github.com/i18next/react-i18next/issues/332)
721
-
722
- ## 10.0.6
723
-
724
- - native browser es modules via adding .js where needed [PR980](https://github.com/i18next/i18next/pull/980)
725
-
726
- ## 10.0.5
727
-
728
- - should fix sync of options in clone and its translator
729
-
730
- ## 10.0.2
731
-
732
- - fixes issue in object return when passing in multiple keys
733
-
734
- ## 10.0.1
735
-
736
- - fixes support for using suffix `_0` on languages only having "singular" form
737
-
738
- ## 10.0.0
739
-
740
- - **[BREAKING]** brings pt, pt-PT, pt-BR plurals in line with, new pt reflects pt-BR and pt-PT gets a special case for plural handling http://www.unicode.org/cldr/charts/26/supplemental/language_plural_rules.html
741
-
742
- ## 9.1.0
743
-
744
- - support for using suffix `_0` on languages only having "singular" form enables easier convert in tool chains
745
-
746
- ## 9.0.1
747
-
748
- - propagate changeLanguage to translator after loadResources
749
-
750
- ## 9.0.0
751
-
752
- - **[BREAKING]** removes the compatibility options to i18next v1 you can add that back like we do in our backward compatibility tests: [https://github.com/i18next/i18next/blob/master/test/backward/v1.11.1.compat.js#L45-L52](https://github.com/i18next/i18next/blob/master/test/backward/v1.11.1.compat.js#L45-L52)
753
- - removes the compatibility options to i18next v1
754
- - allows passing in second param as string on getFixedT returned t function so we could use that as defaultValue
755
- - add setting maxReplaces in interpolation options to prevent endless loop in interpolation
756
-
757
- ## 8.4.3
758
-
759
- - getFixedT lng parameter of array type -> pass as lngs to t function [PR949](https://github.com/i18next/i18next/pull/949)
760
-
761
- ## 8.4.2
762
-
763
- - fixes merging options in clone instance...do not override passed values by values on main instance
764
-
765
- ## 8.4.1
766
-
767
- - emits correct lng to changeLanguage event (fixes async detection behaviour) [PR933](https://github.com/i18next/i18next/pull/933)
768
-
769
- ## 8.4.0
770
-
771
- - expose i18next.options.interpolation.format on i18next.format
772
- - i18next.dir if not passing lng use first of i18next.languages before using i18next.language
773
-
774
- ## 8.3.0
775
-
776
- - allows nesting objects/arrays into objects [#925](https://github.com/i18next/i18next/issues/925)
777
-
778
- ## 8.2.1
779
-
780
- - fixes issue in async lng detection
781
-
782
- ## 8.2.0
783
-
784
- - supports now async language detection - when language detector has member async = true
785
-
786
- ## 8.1.0
787
-
788
- - option to disable nesting by calling `i18next.t('key', { nest: false })` [PR920](https://github.com/i18next/i18next/pull/920)
789
- - fixes passing lng from options to formatter function if available
790
-
791
- ## 8.0.0
792
-
793
- - nonExplicitWhitelist flag now not only gets considered on a fallback lng but also on user language. Eg. userlng 'de-AT' and whitelist ['de'] will now let de-AT pass as whitelisted if nonExplicitWhitelist is set true.
794
-
795
- ## 7.2.3
796
-
797
- - rebuild seems we had a mistake in pushing latest build
798
-
799
- ## 7.2.2
800
-
801
- - fixes issue in accepting string as a result of "nested" lookup [PR909](https://github.com/i18next/i18next/pull/909)
802
-
803
- ## 7.2.1
804
-
805
- - fixes iterating over object's own properties [#904](https://github.com/i18next/i18next/pull/904)
806
-
807
- ## 7.2.0
808
-
809
- - new init option simplifyPluralSuffix - setting it to false will treat all plurals using suffix numbers even for locals only having singular and plural
810
- - even if no lng set or detected at least load the fallback languages
811
- - delay init call on createInstance if not set initImmediate to false [#879](https://github.com/i18next/i18next/issues/879)
812
-
813
- ## 7.1.3
814
-
815
- - fixes issue in returnObject tree called with options including ns: [react-i18next #240](https://github.com/i18next/react-i18next/issues/240)
816
-
817
- ## 7.1.2
818
-
819
- - remove regex escape from format separators [#896](https://github.com/i18next/i18next/pull/896)
820
-
821
- ## 7.1.1
822
-
823
- - change to named plugins for 3rd party - just calling init
824
-
825
- ## 7.1.0
826
-
827
- - add option to include plugins not directly related - they get called their init function with current instance of i18next on init
828
-
829
- ## 7.0.1
830
-
831
- - fix issue in fallback lng detection if no code was detected
832
- - check for having a lng in append when searching locals to load on loadResources - avoid error on express middleware
833
-
834
- ## 7.0.0
835
-
836
- - [BREAKING] Removed special cases for norwegian which resolved nb-NO to nb-NO, no will now resolve to nb-NO, nb [#870](https://github.com/i18next/i18next/issues/870) using norwegian you could migrate to old behaviour like:
837
-
838
- fallbackLng: {
839
- 'nb': ['no', 'en'],
840
- 'nn': ['no', 'en'],
841
- 'default': ['en']
842
- }
843
-
844
- - adding exports for named import (destruction es6) [#873](https://github.com/i18next/i18next/issues/873)
845
- - change entry point for umd build to /src/i18next to avoid mixed export
846
- - replace cloning in interpolation nesting to use object assign instead of json.stringify/parse so circular structures can be used [#875](https://github.com/i18next/i18next/issues/875)
847
- - update all build dependencies
848
-
849
- ## 6.1.2
850
-
851
- - fixes fix in 6.1.1
852
-
853
- ## 6.1.1
854
-
855
- - patching same separators to lookup if the ns exists - else guess the first item is just part of the key and not meant as a namespace
856
-
857
- ## 6.1.0
858
-
859
- - you now can use same nsSeparator and keySeparator (eg. use a dot for both)
860
-
861
- ## 6.0.3
862
-
863
- - do not loop over objectTree if keySeparator is set to false
864
-
865
- ## 6.0.2
866
-
867
- - fixes init flow of clone
868
-
869
- ## 6.0.1
870
-
871
- - fixes issue in event emitter, assert all emitters get called even if one called get removed and changes the array index
872
-
873
- ## 6.0.0
874
-
875
- - Return namespace in cimode with appendNamespaceToCIMode option (default now will only return key without namespace - independent of call to t function) [#863](https://github.com/i18next/i18next/issues/863)
876
-
877
- ## 5.0.0
878
-
879
- - Nested keys should not be escaped by default [#854](https://github.com/i18next/i18next/issues/854)
880
- - Make sure i18next.init() runs for i18next.cloneInstance() [#860](https://github.com/i18next/i18next/pull/860)
881
-
882
- ## 4.2.0
883
-
884
- - adds i18next.isInitialized when isInitialized
885
- - triggers backend loaded event before initialized
886
-
887
- ## 4.1.3 / 4.1.4
888
-
889
- - smaller changes suggested to still inofficial support ie8 [#852](https://github.com/i18next/i18next/issues/852)
890
-
891
- ## 4.1.2
892
-
893
- - fixes same interpolation object with multiple getFixedT() in different locales yields wrong translation [#851](https://github.com/i18next/i18next/issues/851)
894
- - updated all build deps
895
-
896
- ## 4.1.1
897
-
898
- - remove subs array from logger - no longer keep changing debug flag on subs if changing on main
899
-
900
- ## 4.1.0
901
-
902
- - Custom escape function, single-quotes in nested [#843](https://github.com/i18next/i18next/pull/843)
903
-
904
- ## 4.0.0
905
-
906
- - [BREAKING; only webpack2-beta users] will add module entry point used by webpack2, this might break your current build with webpack2-beta if configured incorrectly, see: [#836](https://github.com/i18next/i18next/issues/836)
907
-
908
- ## 3.5.2
909
-
910
- - remove the module entry point again will be added in 4.0.0
911
-
912
- ## 3.5.1
913
-
914
- - fix build output add a test file to test the generated build
915
-
916
- ## 3.5.0
917
-
918
- - Setting options on individual translations override, rather than merge global configs [#832](https://github.com/i18next/i18next/issues/832)
919
- - Create an new translator when cloning i18next instance [#834](https://github.com/i18next/i18next/pull/834)
920
- - allows fallbackLng to be an string, an array or an object defining fallbacks for lng, lng-region plus default, eg
921
-
922
- fallbackLng: {
923
- 'de-CH': ['fr', 'it', 'en'],
924
- 'de': ['fr', 'en'],
925
- 'zh-Hans': ['zh-Hant', 'en'],
926
- 'zh-Hant': ['zh-Hans', 'en'],
927
- 'default': ['en']
928
- }
929
-
930
- ## 3.4.4
931
-
932
- - Fix Interpolator.escapeValue defaulting to undefined in some cases [#826](https://github.com/i18next/i18next/issues/826)
933
-
934
- ## 3.4.3
935
-
936
- - Fix Interpolator formatter exception error propagation due to not reset RegExp indices [#820](https://github.com/i18next/i18next/issues/820)
937
-
938
- ## 3.4.2
939
-
940
- - assert dir function does not crash if no language available
941
-
942
- ## 3.4.1
943
-
944
- - fix issue with format containing formatSeparator for interpolation formatting
945
-
946
- ## 3.4.0
947
-
948
- - adds formatting 'format this: {{var, formatRule}}' having a function on options.interpolation.format: function(value, format, lng) { return value } like suggested here [#774](https://github.com/i18next/i18next/issues/774)
949
-
950
- ## 3.3.1
951
-
952
- - fixed an issue with several unescaped key in the interpolation string [#746](https://github.com/i18next/i18next/pull/746)
953
-
954
- ## 3.3.0
955
-
956
- - allows option `nonExplicitWhitelist` on init [#741](https://github.com/i18next/i18next/pull/741)
957
-
958
- ## 3.2.0
959
-
960
- - adds api function i18next.reloadResources(), i18next.reloadResources(lngs, ns) to trigger a reload of translations
961
-
962
- ## 3.1.0
963
-
964
- - emits missingKey always (like console.log) even if saveMissing is of -> use missingKeyHandler if you only want the trigger only on saveMissing: true
965
-
966
- ## 3.0.0
967
-
968
- - **[BREAKING]** per default i18next uses now the same index as used in gettext for plurals. eg. for arabic suffixes are 0,1,2,3,4,5 instead of 0,1,2,3,11,100. You can enforce old behaviour by setting compatibilityJSON = 'v2' on i18next init.
969
- - **[BREAKING]** AMD export will be unnamed now
970
- - don't call saveMissing if no lng
971
-
972
- ## 2.5.1
973
-
974
- - fixes rtl support [#656](https://github.com/i18next/i18next/pull/656/files)
975
-
976
- ## 2.5.0
977
-
978
- - allow null or empty string as defaultValue
979
- - init option `initImmediate (default: true)` to init without immediate
980
-
981
- ## 2.4.1
982
-
983
- - if passing resources don't immediate loading fixes [#636](https://github.com/i18next/i18next/issues/636)
984
-
985
- ## 2.4.0
986
-
987
- - support now language code variants with scripts and other exotic forms: zh-Hans-MO, sgn-BE-fr, de-AT-1996,...
988
- - trigger of changeLanguage, load of data with a setTimeout to allow other operations meanwhile
989
-
990
- ## 2.3.5
991
-
992
- - Only add language to preload array when new [#613](https://github.com/i18next/i18next/pull/613/files)
993
-
994
- ## 2.3.4
995
-
996
- - get babel 6 output IE compatible: https://jsfiddle.net/jamuhl/2qc7oLf8/
997
-
998
- ## 2.3.2
999
-
1000
- - add index to make export compatible again
1001
-
1002
- ## 2.3.1
1003
-
1004
- - build /dist/es with included babelhelpers
1005
-
1006
- ## 2.3.0
1007
-
1008
- - change build chain to use rollup...allows 'js:next' and reduces build from 45kb to 33kb minified (/lib --> /dist/commonjs folder, new /dist/es for rollup,...)
1009
- - fixes detection when using both context and pluralization and context not found. [#851](https://github.com/i18next/i18next/pull/581)
1010
-
1011
- ## 2.2.0
1012
-
1013
- - return instance after init for further chaning
1014
- - make init optional on backend, cache
1015
- - package.json entry points now to /lib not to mangled version...this might be the better solution for most use cases (build chains built on npm, webpack, browserify, node,...)
1016
-
1017
- ## 2.1.0
1018
-
1019
- - allow keySeparator, nsSeparator = false to turn that off
1020
-
1021
- ## 2.0.26
1022
-
1023
- - extended emitted arguments on 'added' event
1024
-
1025
- ## 2.0.24
1026
-
1027
- - fixes unneeded reload of resources that failed to load
1028
-
1029
- ## 2.0.23
1030
-
1031
- - fixes returnObjects in case of multiple namespaces
1032
-
1033
- ## 2.0.22
1034
-
1035
- - add options for context, pluralSeparator
1036
-
1037
- ## 2.0.21
1038
-
1039
- - clear done load request in backendConnector
1040
-
1041
- ## 2.0.20
1042
-
1043
- - pass full options to detectors as third arg
1044
-
1045
- ## 2.0.19
1046
-
1047
- - do not callback err in backendConnector if no backend is specified
1048
-
1049
- ## 2.0.18
1050
-
1051
- - check for fallbackLng exist
1052
-
1053
- ## 2.0.17
1054
-
1055
- - adds cimode to options.whitelist if set
1056
- - emits failedLoading on load error
1057
-
1058
- ## 2.0.16
1059
-
1060
- - adds addResource to i18next API
1061
- - fix init of i18next without options, callback
1062
-
1063
- ## 2.0.15
1064
-
1065
- - avoid loading of resources for lng=cimode
1066
-
1067
- ## 2.0.14
1068
-
1069
- - enhance callback on load from backend...wait for pendings
1070
-
1071
- ## 2.0.10
1072
-
1073
- - fixing build chain
1074
- - do not post process on nested translation resolve
1075
-
1076
- ## 2.0.5
1077
-
1078
- - fixing allow nesting on interpolated nesting vars
1079
-
1080
- ## 2.0.4
1081
-
1082
- - don't log lng changed if no lng was detected
1083
- - extend result on arrayJoins
1084
-
1085
- ## 2.0.1
1086
-
1087
- - assert defaults are arrays where needed
1088
- - assert calling lngUtils.toResolveHierarchy does not add undefined as code if called without code param
1089
-
1090
- ## 2.0.0
1091
-
1092
- - complete rewrite of i18next codebase
1093
-
1094
- ---
1095
-
1096
- ## 1.11.2
1097
-
1098
- - replace forEach loop to support IE8 [PR 461](https://github.com/i18next/i18next/pull/461)
1099
-
1100
- ## 1.11.1
1101
-
1102
- - fixes issue in nesting using multiple namespaces and lookups in fallback namespaces
1103
- - Fix use of sprintf as shortcutFunction when first argument falsey [PR 453](https://github.com/i18next/i18next/pull/453)
1104
-
1105
- ## 1.11.0
1106
-
1107
- - Add nsseparator and keyseparator as options to translation function [PR 446](https://github.com/i18next/i18next/pull/446)
1108
- - Resolves issue #448 - TypeScript errors [PR 449](https://github.com/i18next/i18next/pull/449)
1109
- - Fixing \_deepExtend to handle keys deep existing in source and target [PR 444](https://github.com/i18next/i18next/pull/444)
1110
- - `resource` to `resources` in addResources function [PR 440](https://github.com/i18next/i18next/pull/440)
1111
- - Runs multiple post processes for missing translations [PR 438](https://github.com/i18next/i18next/pull/438)
1112
- - Add support to override Ajax HTTP headers [PR 431](https://github.com/i18next/i18next/pull/431)
1113
- - Fixed mnk plural definition [PR 427](https://github.com/i18next/i18next/pull/427)
1114
- - Add dir function to return directionality of current language, closes… [PR 413](https://github.com/i18next/i18next/pull/413)
1115
-
1116
- ## 1.10.3
1117
-
1118
- - fixes issue where lng get fixed on data-i18n-options
1119
- - [SECURITY] merges Reimplement XSS-vulnerable sequential replacement code [PR 443](https://github.com/i18next/i18next/pull/443)
1120
-
1121
- ## 1.10.2
1122
-
1123
- - streamline callback(err, t) for case where resStore is passed in
1124
-
1125
- ## 1.10.1
1126
-
1127
- - fixes Adds jquery like functionality without the jquery plugin. [PR 403](https://github.com/i18next/i18next/pull/403) by adding it to output
1128
-
1129
- ## 1.10.0
1130
-
1131
- - [BREAKING] new callbacks will be node.js conform function(err, t) | Forward the error from sync fetch methods to the init callback function [PR 402](https://github.com/i18next/i18next/pull/402)
1132
- - fix fallback lng option during translations [PR 399](https://github.com/i18next/i18next/pull/399)
1133
- - Adds jquery like functionality without the jquery plugin. [PR 403](https://github.com/i18next/i18next/pull/403)
1134
-
1135
- ## 1.9.1
1136
-
1137
- - fix fallback lng option during translations [PR 399](https://github.com/i18next/i18next/pull/399)
1138
- - Adds jquery like functionality without the jquery plugin. [PR 403](https://github.com/i18next/i18next/pull/403)
1139
-
1140
- ## 1.9.0
1141
-
1142
- - i18n.noConflict() [PR 371](https://github.com/i18next/i18next/pull/371)
1143
- - fix fallback to default namepsace when namespace passed as an option [PR 375](https://github.com/i18next/i18next/pull/375)
1144
- - cache option for ajax requests [PR 376](https://github.com/i18next/i18next/pull/376)
1145
- - option to show key on value is empty string [PR 379](https://github.com/i18next/i18next/pull/379)
1146
- - Add isInitialized method [PR 380](https://github.com/i18next/i18next/pull/380)
1147
- - Null check for detectLngFromLocalStorage [PR 384](https://github.com/i18next/i18next/pull/384)
1148
- - support for adding timeout in configuration for ajax request [PR 387](https://github.com/i18next/i18next/pull/387)
1149
-
1150
- ## 1.8.2
1151
-
1152
- - fixes build of commonjs with jquery file
1153
-
1154
- ## 1.8.0
1155
-
1156
- - [BREAKING] adds custom build for commonjs with jquery...default will be without require for jquery
1157
- - fixes issue [issue 360](https://github.com/i18next/i18next/issues/360)
1158
- - expose applyReplacement on api
1159
- - save resources to localStorage when useLocaleStore is true
1160
- - add support on key is a number
1161
- - added getResourceBundle to API
1162
- - allow multiple post-processors
1163
- - fallback to singular if no plural is found fixes issue [issue 356](https://github.com/i18next/i18next/issues/356)
1164
- - access localstorage always with try catch fixes issue [issue 353](https://github.com/i18next/i18next/issues/353)
1165
-
1166
- ## 1.7.7
1167
-
1168
- - fixes issue with stack overflow on t(lng, count)
1169
- - fixes empty value fallback when processing secondary ns
1170
-
1171
- ## 1.7.6
1172
-
1173
- - fixes lng detection (i18next-client on npm)
1174
-
1175
- ## 1.7.5
1176
-
1177
- - adds option to define defaultOptions, which gets merged into t(options) [issue 307](https://github.com/i18next/i18next/issues/307)
1178
- - optimization of size added by plural rules
1179
- - handle error on json parse when using internal xhr
1180
- - fixes plural/singular on count if going on fallbacks eg. fr --> en
1181
- - fixes global leak of sync in amd versions
1182
- - apply options.lowerCaseLng to fallbackLng too
1183
- - added hasResourceBundle(lng, ns) to check if bundle exists
1184
- - added experimental i18n.sync.reload --> resets resStore and reloads resources
1185
- - catch issues with localStorage quota
1186
- - changes detectlanguage to support whitelist entries
1187
-
1188
- ## 1.7.4
1189
-
1190
- - add resource bundle gets deep extend flag i18n.addResourceBundle(lng, ns, { 'deep': { 'key2': 'value2' }}, true);
1191
- - new functions to add one key value or multiple i18n.addResource(lng, ns, key, value);, i18n.addResources(lng, ns, {'key1': 'value1', 'deep.key2': 'value2'});
1192
- - lngWhitelist merged
1193
- - override postMissing function
1194
- - allow floats for count
1195
- - added indefinite functionality for plurals
1196
- - optional set replacing vars to replace member to avoid collision with other options
1197
- - experimental optional detectLngFromLocalStorage
1198
- - fix for norwegian language
1199
-
1200
- ## 1.7.3
1201
-
1202
- - solves issue with ie8 not providing .trim function on string -> added to shim
1203
- - set data using \$(selector).i18n() on data-i18n='[data-someDataAttr]key'
1204
- - more bullet proof state handling on failed file load
1205
- - corrected latvian plurals based on [issue 231](https://github.com/jamuhl/i18next/issues/231)
1206
- - allow array of fallback languages
1207
- - allow int in values passed to shortcut sprintf
1208
- - setLng to 'cimode' will trigger a CI mode returning 'key' instead of translation
1209
-
1210
- ## 1.7.2
1211
-
1212
- - introducing option fallbackOnEmpty -> empty string will fallback
1213
- - added function removeResourceBundle(lng, ns) -> removes a resource set
1214
- - fixed issue with no option passed to setLng
1215
- - added ability to prepend, append content with data-i18n attributes
1216
- - introducing objectTreeKeyHandler
1217
- - fixes issue with i18n.t(null), i18n.t(undefined) throwing exception
1218
- - returnObjectTrees does not mangle arrays, functions, and regexps
1219
- - optimized structure for bower support
1220
-
1221
- ## 1.7.1
1222
-
1223
- - fixed some typo
1224
- - allow translate to take an array of keys - take first found
1225
- - allow numbers in object trees
1226
-
1227
- ## 1.7.0
1228
-
1229
- - test if initialisation finished before allowing calling t function
1230
- - setting option fixLng=true will return t function on init or setLng with the lng fixed for every subsequent call to t
1231
- - grab key from content if attr data-i18n has no value
1232
- - setting shortcutFunction to 'defaultValue' allows calling i18n.t(key, defaultValue)
1233
- - empty string in defaultValue is now valid no longer displaying key
1234
- - allow option cookieDomain
1235
- - fixes issue #115 out of stack exception in IE8 by recursing \_translate in objectTrees
1236
-
1237
- ## 1.6.3
1238
-
1239
- - option to parse key if missing
1240
- - fixes issue where plural don't get translated if language is passed in t options
1241
- - fixes issue where key or defaultValue aren't postProcessed with itself as value
1242
- - fixes issue with fallbackLng = false in combination with sendMissingTo = fallback
1243
- - fixes namespace fallback loop to only loop if array has really a ns in it
1244
-
1245
- ## 1.6.2
1246
-
1247
- - fixes some var typo
1248
- - fixes sendMissing to correct namespace
1249
- - fixes sendMissing in combination with fallbackNS
1250
-
1251
- ## 1.6.1
1252
-
1253
- - PR #106 optionally un/escape interpolated content
1254
- - PR #101 automatic gettext like sprintf syntax detection + postprocess injection
1255
- - customload will get called on dynamicLoad too
1256
- - fixes namespace array settings if loaded resourcebundle or additional namespaces
1257
- - lookup of not existend resouces can be fallbacked to other namespaces - see option fallbackNS (array or string if one ns to fallback to)
1258
- - defaultValues get postProcessed
1259
- - BREAKING: per default null values in resources get translated to fallback. This can be changed by setting option fallbackOnNull to false
1260
- - PR #81 added support for passing options to nested resources
1261
- - PR #88 added an exists method to check for the existence of a key in the resource store
1262
- - fixed issue with null value throws in applyReplacement function
1263
- - fixed issue #80 empty string lookup ends in fallback instead of returning result in language
1264
- - fixed issue with null value in resources not returning expected value
1265
- - optimized tests to use on server (nodejs) too
1266
- - allow zepto as drop in replacement for \$
1267
- - using testacular as runner
1268
- - upgraded to grunt 0.4.0
1269
- - fixed optional interpolation prefix/suffix not used in plural translation cases
1270
- - optimized check if there are multiple keys for the data-i18n attribute to parse
1271
-
1272
- ## 1.6.0
1273
-
1274
- - option to specify target to set attributes with jquery function by using 'data-i18n-target attribute'
1275
- - function to set new options for nesting functionality
1276
- - function to add resources after init
1277
- - option to lookup in default namespace if value is not found in given namespace
1278
- - option to change interpolation prefix and suffix via translation options
1279
- - fixed issue with using ns/keyseparator on plurals, context,...
1280
- - fixed issue with posting missing when not using jquery
1281
- - post missing in correct lng if lng is given in translation options
1282
- - proper usage of deferred object in init function
1283
- - fixed issue replacing values in objectTree
1284
-
1285
- ## 1.5.10
1286
-
1287
- - BREAKING: fixed plural rules for languages with extended plural forms (more than 2 forms)
1288
- - merged pull #61 - custom loader (enables jsonp or other loading custom loading strategies)
1289
- - escaping interpolation prefix/suffix for proper regex replace
1290
-
1291
- ## 1.5.9
1292
-
1293
- - functions to load additional namespaces after init and to set default namespace to something else
1294
- - set if you don't want to read defaultValues from content while using jquery fc
1295
- - set dataAttribute to different value
1296
- - set cookieName to different value
1297
- - some smallbugfixes
1298
- - typesafe use of console if in debug mode
1299
-
1300
- ## 1.5.8
1301
-
1302
- - disable cookie usage by setting init option useCookie to false
1303
- - accept empty string as translation value
1304
- - fixed bug in own ajax implementation not using proper sendType
1305
- - fixed bug for returning objTree in combination with namespace
1306
- - fixed bug in plurals of romanic lngs
1307
-
1308
- ## 1.5.7
1309
-
1310
- - pass namespace in t() options
1311
- - interpolation nesting
1312
- - changable querystring param to look language up from
1313
-
1314
- ## 1.5.6
1315
-
1316
- - typesafe check for window, document existance
1317
- - runnable under rhino
1318
- - seperated amd builds with/without jquery
1319
-
1320
- ## 1.5.5
1321
-
1322
- - **BREAKING** added all plurals: suffixes will new be same as in gettext usage (number indexes key_plural_0|2|3|4|5|7|8|10|11|20|100), additional if needed signature of addRule has changed
1323
- - added sprintf as postprocessor -> postProcess = 'sprintf' and sprintf = obj or array
1324
- - set default postProcessor on init
1325
- - redone build process with grunt
1326
- - drop in replacement for jquery each, extend, ajax
1327
- - setting fallbackLng to false will stop loading and looking it up
1328
- - option to load only current or unspecific language files
1329
-
1330
- ## 1.5.0
1331
-
1332
- - pass options to sync.\_fetchOne, use options for fetching
1333
- - support for i18next-webtranslate
1334
-
1335
- ## 1.4.1
1336
-
1337
- - post processor
1338
- - **BREAKING:** localStorage defaults to false
1339
- - added localStorageExpirationTime for better caching control
1340
- - few bug fixes
1341
-
1342
- ## 1.4.0
1343
-
1344
- - preload multiple languages
1345
- - translate key to other language than current
1346
- - fixed issue with namespace usage in combination with context and plurals
1347
- - more options to send missing values
1348
- - better amd support
1349
-
1350
- ## 1.3.4
1351
-
1352
- - set type of ajax request to GET (options sendType: default POST)
1353
- - set cookie expiration (options cookieExpirationTime: in minutes)
1354
- - read / cache translation options (context, count, ...) in data-attribute (options useDataAttrOptions: default false)
1355
-
1356
- ## 1.3.3
1357
-
1358
- - optional return an objectTree from translation
1359
- - use jquery promises or callback in initialisation
1360
- - rewrote all tests with mocha.js
1361
-
1362
- ## 1.3.2
1363
-
1364
- - options to init i18next sync (options -> getAsync = false)
1365
- - replace all occurence of replacement string
1366
-
1367
- ## 1.3.1
1368
-
1369
- - pass options to selector.i18n() thanks to [@hugojosefson](https://github.com/jamuhl/i18next/pull/10)
1370
- - close [issue #8(https://github.com/jamuhl/i18next/issues/8)]: Fail silently when trying to access a path with children
1371
- - cleanup
1372
- - debug flag (options.debug -> write infos/errors to console)
1373
-
1374
- ## 1.2.5
1375
-
1376
- - fix for IE8
1377
-
1378
- ## 1.2.4
1379
-
1380
- - added indexOf for non ECMA-262 standard compliant browsers (IE < 9)
1381
- - calling i28n() on element with data-i18n attribute will localize it now (i18n now not only works on container elements child)
1382
-
1383
- ## 1.2.3
1384
-
1385
- - extended detectLng: switch via qs _setLng=_ or cookie _i18next_
1386
- - assert county in locale will be uppercased `en-us` -> `en-US`
1387
- - provide option to have locale always lowercased _option lowerCaseLng_
1388
- - set lng cookie when set in init function
1389
-
1390
- ## 1.2
1391
-
1392
- - support for translation context
1393
- - fixed zero count in plurals
1394
- - init without options, callback
1395
-
1396
- ## 1.1
1397
-
1398
- - support for multiple plural forms
1399
- - common.js enabled (for node.js serverside)
1400
- - changes to be less dependent on jquery (override it's functions, add to root if no jquery)
1401
- - enable it on serverside with node.js [i18next-node](https://github.com/jamuhl/i18next-node)
1402
-
1403
- ## 1.0
1404
-
1405
- - support for other attribute translation via _data-i18n_ attribute
1406
- - bug fixes
1407
- - tests with qunit and sinon
1408
-
1409
- ## 0.9
1410
-
1411
- - multi-namespace support
1412
- - loading static files or dynamic route
1413
- - jquery function for _data-i18n_ attibute
1414
- - post missing translations to the server
1415
- - graceful fallback en-US -> en -> fallbackLng
1416
- - localstorage support
1417
- - support for pluralized strings
1418
- - insertion of variables into translations
1419
- - translation nesting