scene.js 435 B

1234567891011121314151617181920
  1. 'use strict';
  2. let message = {};
  3. message['update-default-language'] = function (event, language) {
  4. let i18n = cc.require('LanguageData');
  5. i18n.init(language);
  6. i18n.updateSceneRenderers();
  7. if (!event.reply) {
  8. return;
  9. }
  10. if (language) {
  11. event.reply(null, 'successful');
  12. } else {
  13. event.reply(new Error('language not specified!'));
  14. }
  15. };
  16. module.exports = message;