export default { en: { dsc_edit: 'Edit', // Basic multi language with dsc_ start and name it semantically dsc_hour: 'Hour', dsc_minute: 'Minute', dsc_countdown_on: 'Turn on after {0}{1}', dp_switch: 'Switch', // Datapoint (DP) related multi language should be in accordance with the `dp_${dpCode}` dp_switch_on: 'Switch is On', // Boolean type datapoint related multi language should be in accordance with the `dp_${dpCode}_${'on' || 'off'}` dp_mode_smart: 'Smart Mode', // Enum type datapoint related multi language should be in accordance with the `dp_${dpCode}_${enumValue}` dp_fault_0: 'Binary first bit is faulty', // Bitmap type datapoint related multi language should be in accordance with the `dp_${dpCode}_${bit}` dp_fault_1: 'Binary second bit is faulty', // How to use of bitmap, see https://support.tuya.com/en/help/_detail/K9mc4euc6tq9i }, zh: { dsc_edit: '编辑', // 基础多语言以 dsc_ 开头并命名语义化即可 dsc_hour: '时', dsc_minute: '分', dsc_countdown_on: '设备将在{0}{1}后开启', dp_switch: '开关', // 功能点(DP)相关多语言需按照 `dp_${dpCode}` 进行命名 dp_switch_on: '开关开', // 布尔类型功能点状态相关多语言需按照 `dp_${dpCode}_${'on' || 'off'}` 进行命名 dp_mode_smart: '智能模式', // 枚举类型功能点状态相关多语言需按照 `dp_${dpCode}_${enumValue}` 进行命名 dp_fault_0: '第一位故障', // Bitmap 类型功能点状态相关多语言需按照 `dp_${dpCode}_${bit}` 进行命名 dp_fault_1: '第二位故障', // Bitmap 型如何使用可参考 https://support.tuya.com/zh/help/_detail/K9mc4euc6tq9i },};
// 请求示例对应多语言数据源// export default {// en: {// dp_switch: 'Switch', // Datapoint (DP) related multi language should be in accordance with the `dp_${dpCode}`// dp_switch_on: 'Switch is On', // Boolean type datapoint related multi language should be in accordance with the `dp_${dpCode}_${'on' || 'off'}`// },// zh: {// dp_switch: '开关', // 功能点(DP)相关多语言需按照 `dp_${dpCode}` 进行命名// dp_switch_on: '开关开', // 布尔类型功能点状态相关多语言需按照 `dp_${dpCode}_${'on' || 'off'}` 进行命名// },// };import Strings from '../i18n';Strings.getDpLang('switch'); // 假设当前运行语种环境为 zh,获取已配置的功能点多语言Strings.getDpLang('switch', true); // 假设当前运行语种环境为 zh,获取已配置的功能点状态多语言Strings.getDpLang('switch', false); // 假设当前运行语种环境为 zh,获取未配置的功能点状态多语言
// export default {// en: {// dp_switch: 'Switch', // Datapoint (DP) related multi language should be in accordance with the `dp_${dpCode}`// },// zh: {// dp_switch: '开关', // 功能点(DP)相关多语言需按照 `dp_${dpCode}` 进行命名// },// };import Strings from '../i18n';Strings.getDpName('switch', '插座开关'); // 假设当前运行语种环境为 zh,获取已配置的功能点多语言Strings.getDpName('switch_led', '彩光开关'); // 假设当前运行语种环境为 zh,获取未配置的功能点多语言