Skip to content

Commit a9ef065

Browse files
committed
Added language argument into the Controller.translate().
1 parent ab4beed commit a9ef065

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ function Framework() {
416416

417417
this.id = null;
418418
this.version = 1960;
419-
this.version_header = '1.9.6-19';
419+
this.version_header = '1.9.6-20';
420420

421421
var version = process.version.toString().replace('v', '').replace(/\./g, '');
422422
if (version[0] !== '0' || version[1] !== '0')
@@ -10009,8 +10009,14 @@ Controller.prototype.clear = function() {
1000910009
* @param {String} text
1001010010
* @return {String}
1001110011
*/
10012-
Controller.prototype.translate = function(text) {
10013-
return framework.translate(this.language, text);
10012+
Controller.prototype.translate = function(language, text) {
10013+
10014+
if (!text) {
10015+
text = language;
10016+
language = this.language;
10017+
}
10018+
10019+
return framework.translate(language, text);
1001410020
};
1001510021

1001610022
/**

0 commit comments

Comments
 (0)