Angular seems to trigger the $watch on $i18nextTanslate.options mutliple times with the same value, which causes i18next to ge re-initialized unnecessarily. This is especially bad when we dynamically load resources (it downloads the translation file multiple times).
This change adds a small check to prevent re-initialization of i18next when given the same options.
Angular seems to trigger the
$watch
on$i18nextTanslate.options
mutliple times with the same value, which causes i18next to ge re-initialized unnecessarily. This is especially bad when we dynamically load resources (it downloads the translation file multiple times).This change adds a small check to prevent re-initialization of i18next when given the same options.