Last Updated on : 2024-07-16 06:28:45download
Panel Multilingual BizBundle provides the capabilities to update and get panel language packs for smart products based on the integration with Smart Life App SDK. Go to Tuya Developer Platform > App > Multi-language > Product Language to manage multilingual entries of smart products.
You must call API methods in ThingSmartLangsManager
to get information about the list views.
Add the components of the Voice Skills Account Linking UI BizBundle to the Podfile
and run the command pod update
.
source "https://github.com/tuya/tuya-pod-specs"
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
target 'your_target_name' do
// Adds the UI BizBundle.
pod 'ThingSmartLangsExtraBizBundle'
end
Dependent services: none
API description
- (void)updateProductLangWithProductId:(NSString *)productId
i18nTime:(long long)i18nTime
completeBlock:(void (^)(NSError *error))completeBlock;
Request parameters
Field | Type | Description |
---|---|---|
productId | NSString | The product ID (PID). The devices with the same PID have the same schema data. You can call deviceModel.productId to get the PID. |
i18nTime | Long | The multilingual timestamp of a product. You can call deviceModel.i18nTime to get the value. |
ObjC:
[[ThingSmartLangsManager sharedInstance] updateProductLangWithProductId:deviceModel.productId i18nTime:deviceModel.i18nTime completeBlock:^(NSError * _Nonnull error) {
}];
Swift:
ThingSmartLangsManager.sharedInstance().updateProductLang(withProductId: deviceModel.productId, i18nTime: deviceModel.i18nTime, completeBlock: { (error) in
})
API description
- (void)getProductLangWithProductId:(NSString *)productId
i18nTime:(long long)i18nTime
successBlock:(void (^)(NSDictionary *langsDic))successBlock
failBlock:(void (^)(NSError *error))failBlock;
Request parameters
Field | Type | Description |
---|---|---|
productId | NSString | The product ID (PID). The devices with the same PID have the same schema data. You can call deviceModel.productId to get the PID. |
i18nTime | Long | The multilingual timestamp of a product. You can call deviceModel.i18nTime to get the value. |
ObjC:
[[ThingSmartLangsManager sharedInstance] getProductLangWithProductId:deviceModel.productId i18nTime:deviceModel.i18nTime successBlock:^(NSDictionary * _Nonnull langsDic) {
} failBlock:^(NSError * _Nonnull error) {
}];
Swift:
ThingSmartLangsManager.sharedInstance().getProductLang(withProductId: deviceModel.productId, i18nTime: deviceModel.i18nTime, successBlock: { (result) in
}, failure: { (error) in
})
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback