mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-27 12:08:21 +00:00
20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
'use strict';
|
|
|
|
let message = {};
|
|
|
|
message['update-default-language'] = function (event, language) {
|
|
let i18n = cc.require('LanguageData');
|
|
i18n.init(language);
|
|
i18n.updateSceneRenderers();
|
|
if (!event.reply) {
|
|
return;
|
|
}
|
|
|
|
if (language) {
|
|
event.reply(null, 'successful');
|
|
} else {
|
|
event.reply(new Error('language not specified!'));
|
|
}
|
|
};
|
|
|
|
module.exports = message; |