You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param string $default_translation Optional. The default translation returned if the requested key (translation) doesn't exist.. Default empty string.
if (isset($this->translators[$translator_name])) {
123
+
unset($this->translators[$translator_name]);
124
+
returntrue;
125
+
}
126
+
returnfalse;
127
+
}
128
+
129
+
/**
130
+
* Changes the localization code.
131
+
* @param string $code
132
+
* @param bool $refresh Optional. After changing the code, should it reload the loaded translators or remove all of them from the loaded state? Default false.
133
+
*/
134
+
publicfunctionrecode($code, $refresh = false)
135
+
{
136
+
$this->code = $code;
137
+
if ($refresh) {
138
+
$this->refresh();
139
+
} else {
140
+
$this->translators = [];
141
+
}
142
+
}
143
+
144
+
/**
145
+
* @param string $key The key is in the translator.
0 commit comments