VivochaLocalization

@interface VivochaLocalization : NSObject

Represents a set of translations for a given language

Usage example:

    VivochaLocalization *en = [VivochaLocalization localizationWithLanguage:@"en"];
    //Changes the "Agent" string to "Representative"
    [en setTranslation:@"Representative" forKey:VivochaSDK_String_Agent];
    [Vivocha addLocalization:en];
  • @property (nonatomic, retain) NSString *language;

    The language identifier (e.g. “en”, “it”, “zh-Hans”)

  • + (VivochaLocalization *)localizationWithLanguage:(NSString *)lang;

    Returns a VivochaLocalization object for the given language.

    Parameters

    lang

    the language identifier (e.g. “en”, “it”, “zh-Hans”)

  • - (id)initWithLanguage:(NSString *)lang;

    Initializes a VivochaLocalization object with the given language.

    Parameters

    lang

    the language identifier (e.g. “en”, “it”, “zh-Hans”)

  • - (void)setTranslation:(NSString *)translation forKey:(NSString *)key;

    Set a translation string for the given key.

    Parameters

    translation

    the translated string (e.g. “LIVE HELP”)

    key

    the translation key being translated

  • - (NSString *)getTranslationForKey:(NSString *)key;

    Returns the translation string for the given key.

    Parameters

    key

    the translation key

  • - (NSArray *)translatedKeys;

    Returns a list of translated keys.