Setting the Language
setLanguage
API Description
This API is used to set the SDK language. The default language is Chinese.
Precautions
None
Method Definition
1
|
+ (void)setLanguage:(HWMSdkLanguageType)language; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
language |
Yes |
Enumerated values of languages. |
Enumerated Value |
Description |
---|---|
HWMSdkLanguageTypeZH |
Chinese. |
HWMSdkLanguageTypeEN |
English. |
HWMSdkLanguageTypeCustomized |
Custom language. |
Return Values
None
Sample Code
1 2 |
/// Change the language. [HWMSdk setLanguage:HWMSdkLanguageType]; |
setLanguage:languageCode:
API Description
This API is used to customize the SDK language. The default language is Chinese.
Precautions
To implement a user-defined language, create the corresponding internationalization file in the directory at the same level as en.lproj. For example, to add Arabic, you can create ar.lproj/Localizable.strings. The language set through this API must be the same as the system language.
Method Definition
1
|
+ (void)setLanguage:(HWMSdkLanguageType)language languageCode:(NSString *)languageCode; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
language |
Yes |
Enumerated values of languages. |
|
languageCode |
No |
NSString * |
If LanguageType is set to Chinese or English, this parameter can be left empty or set to any value. If LanguageType is set to other languages, set this parameter to the language code, for example, ar (Arabic). |
Return Values
None
Sample Code
1 2 |
/// Change the language. [HWMSdk setLanguage:HWMSdkLanguageTypeCustomized languageCode:@"ar"]; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot