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