Tuya iOS Smart Life App SDK 5.15.0
ThingLanguageLoader Class Reference

#import <ThingLanguageLoader.h>

Inheritance diagram for ThingLanguageLoader:

Instance Methods

(void) - registerLocalizedBundle:defaultLanguage:
 
(BOOL) - isExistLocalized:
 
(NSString *) - localizedString:
 
(void) - registerLocalizedBundle:defaultLanguage:
 
(BOOL) - isExistLocalized:
 
(NSString *) - localizedString:
 
(void) - registerLocalizedBundle:defaultLanguage:
 
(BOOL) - isExistLocalized:
 
(NSString *) - localizedString:
 
(void) - registerLocalizedBundle:defaultLanguage:
 
(BOOL) - isExistLocalized:
 
(NSString *) - localizedString:
 

Class Methods

(instancetype) + sharedInstance
 
(NSBundle *) + languageRootBundle:
 
(instancetype) + sharedInstance
 
(NSBundle *) + languageRootBundle:
 
(instancetype) + sharedInstance
 
(NSBundle *) + languageRootBundle:
 
(instancetype) + sharedInstance
 
(NSBundle *) + languageRootBundle:
 

Properties

id< ThingLanguageLoaderDelegatedelegate
 
NSBundle * localizedBundle
 
NSString * defaultLanguage
 

Detailed Description

Definition at line 45 of file ThingLanguageLoader.h.

Method Documentation

◆ isExistLocalized: [1/4]

- (BOOL) isExistLocalized: (NSString *)  languageKey

在register bundle中是否能找到keys对应的多语言

Parameters
languageKey多语言key

◆ isExistLocalized: [2/4]

- (BOOL) isExistLocalized: (NSString *)  languageKey

在register bundle中是否能找到keys对应的多语言

Parameters
languageKey多语言key

◆ isExistLocalized: [3/4]

- (BOOL) isExistLocalized: (NSString *)  languageKey

在register bundle中是否能找到keys对应的多语言

Parameters
languageKey多语言key

◆ isExistLocalized: [4/4]

- (BOOL) isExistLocalized: (NSString *)  languageKey

在register bundle中是否能找到keys对应的多语言

Parameters
languageKey多语言key

◆ languageRootBundle: [1/4]

+ (NSBundle *) languageRootBundle: (NSBundle *)  bundle

◆ languageRootBundle: [2/4]

+ (NSBundle *) languageRootBundle: (NSBundle *)  bundle

◆ languageRootBundle: [3/4]

+ (NSBundle *) languageRootBundle: (NSBundle *)  bundle

◆ languageRootBundle: [4/4]

+ (NSBundle *) languageRootBundle: (NSBundle *)  bundle

◆ localizedString: [1/4]

- (NSString *) localizedString: (NSString *)  languageKey

获取key值对应的多语言

Parameters
languageKey多语言key

◆ localizedString: [2/4]

- (NSString *) localizedString: (NSString *)  languageKey

获取key值对应的多语言

Parameters
languageKey多语言key

◆ localizedString: [3/4]

- (NSString *) localizedString: (NSString *)  languageKey

获取key值对应的多语言

Parameters
languageKey多语言key

◆ localizedString: [4/4]

- (NSString *) localizedString: (NSString *)  languageKey

获取key值对应的多语言

Parameters
languageKey多语言key

◆ registerLocalizedBundle:defaultLanguage: [1/4]

- (void) registerLocalizedBundle: (NSBundle *)  bundle
defaultLanguage: (NSString *)  defaultLanguage 

注册一个bundle和兜底语言,多语言会从设置的bundle里取,默认[NSBundle mainBundle]和"en"; @param bundle 自定义取多语言的bundle @param defaultLanguage 默认语种,如果其他语种取不到时会用默认语种进行补全,比如@"en". 如果该参数为nil,则默认用@"en"

◆ registerLocalizedBundle:defaultLanguage: [2/4]

- (void) registerLocalizedBundle: (NSBundle *)  bundle
defaultLanguage: (NSString *)  defaultLanguage 

注册一个bundle和兜底语言,多语言会从设置的bundle里取,默认[NSBundle mainBundle]和"en"; @param bundle 自定义取多语言的bundle @param defaultLanguage 默认语种,如果其他语种取不到时会用默认语种进行补全,比如@"en". 如果该参数为nil,则默认用@"en"

◆ registerLocalizedBundle:defaultLanguage: [3/4]

- (void) registerLocalizedBundle: (NSBundle *)  bundle
defaultLanguage: (NSString *)  defaultLanguage 

注册一个bundle和兜底语言,多语言会从设置的bundle里取,默认[NSBundle mainBundle]和"en"; @param bundle 自定义取多语言的bundle @param defaultLanguage 默认语种,如果其他语种取不到时会用默认语种进行补全,比如@"en". 如果该参数为nil,则默认用@"en"

◆ registerLocalizedBundle:defaultLanguage: [4/4]

- (void) registerLocalizedBundle: (NSBundle *)  bundle
defaultLanguage: (NSString *)  defaultLanguage 

注册一个bundle和兜底语言,多语言会从设置的bundle里取,默认[NSBundle mainBundle]和"en"; @param bundle 自定义取多语言的bundle @param defaultLanguage 默认语种,如果其他语种取不到时会用默认语种进行补全,比如@"en". 如果该参数为nil,则默认用@"en"

◆ sharedInstance [1/4]

+ (instancetype) sharedInstance

◆ sharedInstance [2/4]

+ (instancetype) sharedInstance

◆ sharedInstance [3/4]

+ (instancetype) sharedInstance

◆ sharedInstance [4/4]

+ (instancetype) sharedInstance

Property Documentation

◆ defaultLanguage

- (NSString *) defaultLanguage
readnonatomiccopy

Definition at line 52 of file ThingLanguageLoader.h.

◆ delegate

- (id< ThingLanguageLoaderDelegate >) delegate
readwritenonatomicweak

Definition at line 47 of file ThingLanguageLoader.h.

◆ localizedBundle

- (NSBundle *) localizedBundle
readnonatomicstrong

当前多语言在使用的bundle和兜底语言,需要修改可以使用 registerLocalizedBundle:defaultLanguage:方法注册

Definition at line 51 of file ThingLanguageLoader.h.


The documentation for this class was generated from the following files: