New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tml-js-browser

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tml-js-browser - npm Package Compare versions

Comparing version

to
0.4.47

18

lib/index.js

@@ -285,14 +285,24 @@ /**

/**
* Changes language
* Changes language. This method can be used:
*
*
*
* @param locale
* @param refresh
*/
changeLanguage: function (locale) {
changeLanguage: function (locale, refresh) {
tml.app.changeLanguage(locale, function (language) {
helpers.updateCurrentLocale(tml.options.key, locale);
tml.config.currentLanguage = tml.app.getCurrentLanguage();
var autoMode = this.tokenizer && this.tokenizer.updateAllNodes;
refresh = typeof refresh !== undefined ? refresh : !tml.config.refreshHandled;
if (this.tokenizer && this.tokenizer.updateAllNodes) {
// for dynamic translate body - we want to reload all translations automatically
if (autoMode) {
this.tokenizer.updateAllNodes();
} else {
}
if (refresh) {
// let SDKs handle it: server side or manual JS (like backbone or jst) - we may need a refresh
// other client-side SDKs need to handle it themselves - angular, ember
window.location.reload();

@@ -299,0 +309,0 @@ }

{
"name": "tml-js-browser",
"description": "Translation plugin for browsers.",
"version": "0.4.46",
"version": "0.4.47",
"author": {

@@ -6,0 +6,0 @@ "name": "Michael Berkovich",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display