Skip to main content

bfgStrings Class

Big Fish String class. More...#import <bfgStrings.h>

Class Methods

(NSString *) + stringFromKey:
 
(NSString *) + stringFromKey:forLanguage:
 
(BOOL) + loadStringFile:
 
(BOOL) + loadStringFile:fromString:
 

Detailed Description

Big Fish String class. A localizable string class that enables a single file to store strings for all the languages supported by the game.

Method Documentation

◆ loadStringFile:

+ (BOOL) loadStringFile: (NSString *) filename
Parameters
filenameA bfgstrings file.
Returns
Return values
YESif the file loaded without error.
NOif the file did not load.

◆ loadStringFile:fromString:

+ (BOOL) loadStringFile:(NSString *) name
fromString:(NSString *) jsonText 
Parameters
nameA namespace for the string values.
jsonTextA text JSON representation of a strings file.
Returns
YES if jsonText deserializes properly into dictionary.
Return values
YESif jsonText deserializes properly into the dictionary.
NOif jsonText does not deserialize into the dictionary.

◆ stringFromKey:

+ (NSString *) stringFromKey: (NSString *) key
Parameters
keyA key in the bfgstrings file.
Returns
String for the key in the local language.

◆ stringFromKey:forLanguage:

+ (NSString *) stringFromKey:(NSString *) key
forLanguage:(NSString *) language 
Parameters
keyA key in the bfgstrings file.
languageTwo letter language code.
Returns
String for the key in the specified language.