Tuya iOS Smart Life App SDK 5.15.0
<ThingLanguageLoaderDelegate> Protocol Reference

#import <ThingLanguageLoader.h>

Inheritance diagram for <ThingLanguageLoaderDelegate>:

Instance Methods

(nullable NSString *) - beforeLocalizedWithKey:
 
(nullable NSString *) - afterLocalizedWithKey:isFound:isCurrent:localizedString:
 
(nullable NSString *) - beforeLocalizedWithKey:
 
(nullable NSString *) - afterLocalizedWithKey:isFound:isCurrent:localizedString:
 
(nullable NSString *) - beforeLocalizedWithKey:
 
(nullable NSString *) - afterLocalizedWithKey:isFound:isCurrent:localizedString:
 
(nullable NSString *) - beforeLocalizedWithKey:
 
(nullable NSString *) - afterLocalizedWithKey:isFound:isCurrent:localizedString:
 

Detailed Description

多语言代理的 before、after hooks 基于洋葱模型实现

delegate before → /return/
system
delegate after
/return/
__deprecated_msg(void) sweeper end __deprecated_msg("No longer supported; please adopt ThingSmartSweeperDevice (see ThingSmartSweeperDevice.h)") @interface ThingSmartSweeper id< ThingSmartSweeperDelegate > delegate

Definition at line 23 of file ThingLanguageLoader.h.

Method Documentation

◆ afterLocalizedWithKey:isFound:isCurrent:localizedString: [1/4]

- (nullable NSString *) afterLocalizedWithKey: (NSString *)  languageKey
isFound: (BOOL)  isFound
isCurrent: (BOOL)  isCurrent
localizedString: (NSString *)  localizedString 
optional

在获取多语言后的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果对翻译的内容不满意可以做替换等等

Parameters
languageKey多语言key
isFound是否找到了多语言翻译
isCurrent当isFound为True时,这个字段才有效。是否在main bundle(不是默认的语言bundle)中取到的多语言翻译。
localizedString多语言翻译的内容,如果isFound为NO,则localizedString==languageKey

◆ afterLocalizedWithKey:isFound:isCurrent:localizedString: [2/4]

- (nullable NSString *) afterLocalizedWithKey: (NSString *)  languageKey
isFound: (BOOL)  isFound
isCurrent: (BOOL)  isCurrent
localizedString: (NSString *)  localizedString 
optional

在获取多语言后的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果对翻译的内容不满意可以做替换等等

Parameters
languageKey多语言key
isFound是否找到了多语言翻译
isCurrent当isFound为True时,这个字段才有效。是否在main bundle(不是默认的语言bundle)中取到的多语言翻译。
localizedString多语言翻译的内容,如果isFound为NO,则localizedString==languageKey

◆ afterLocalizedWithKey:isFound:isCurrent:localizedString: [3/4]

- (nullable NSString *) afterLocalizedWithKey: (NSString *)  languageKey
isFound: (BOOL)  isFound
isCurrent: (BOOL)  isCurrent
localizedString: (NSString *)  localizedString 
optional

在获取多语言后的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果对翻译的内容不满意可以做替换等等

Parameters
languageKey多语言key
isFound是否找到了多语言翻译
isCurrent当isFound为True时,这个字段才有效。是否在main bundle(不是默认的语言bundle)中取到的多语言翻译。
localizedString多语言翻译的内容,如果isFound为NO,则localizedString==languageKey

◆ afterLocalizedWithKey:isFound:isCurrent:localizedString: [4/4]

- (nullable NSString *) afterLocalizedWithKey: (NSString *)  languageKey
isFound: (BOOL)  isFound
isCurrent: (BOOL)  isCurrent
localizedString: (NSString *)  localizedString 
optional

在获取多语言后的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果对翻译的内容不满意可以做替换等等

Parameters
languageKey多语言key
isFound是否找到了多语言翻译
isCurrent当isFound为True时,这个字段才有效。是否在main bundle(不是默认的语言bundle)中取到的多语言翻译。
localizedString多语言翻译的内容,如果isFound为NO,则localizedString==languageKey

◆ beforeLocalizedWithKey: [1/4]

- (nullable NSString *) beforeLocalizedWithKey: (NSString *)  languageKey
optional

在获取多语言前的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果走了before就不会再走下面的after方法了

Parameters
languageKey多语言key

◆ beforeLocalizedWithKey: [2/4]

- (nullable NSString *) beforeLocalizedWithKey: (NSString *)  languageKey
optional

在获取多语言前的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果走了before就不会再走下面的after方法了

Parameters
languageKey多语言key

◆ beforeLocalizedWithKey: [3/4]

- (nullable NSString *) beforeLocalizedWithKey: (NSString *)  languageKey
optional

在获取多语言前的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果走了before就不会再走下面的after方法了

Parameters
languageKey多语言key

◆ beforeLocalizedWithKey: [4/4]

- (nullable NSString *) beforeLocalizedWithKey: (NSString *)  languageKey
optional

在获取多语言前的回调方法,如果该回调返回了非nil值,则localizedString方法会返回这个值。 可以用这个方法运行时修改工程多语言,如果走了before就不会再走下面的after方法了

Parameters
languageKey多语言key

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