How to use the exists function from i18next
Find comprehensive JavaScript i18next.exists code examples handpicked from public code repositorys.
124 125 126 127 128 129 130 131 132 133
i18n.getCurrentLocale = function() { return i18next.language; }; i18n.existsMessage = function(key) { return i18next.exists(key); }; /** * Helper functions, don't depend of the i18n framework
6
46
6
GitHub: hubot-js/hubot.js
22 23 24 25 26 27 28 29 30 31
i18n.use(backend) .init(initOptions); function t(key, vars) { if (isNaN(key) && i18n.exists(key)) { return vars ? i18n.t(key, vars) : i18n.t(key); } return key;
3
22
3