Smart Localization  2.3
SmartLocalization.LocalizedObject Class Reference

The localized object, used to determine what type the string value from the .resx file is More...

Public Member Functions

 LocalizedObject ()
 Creates a new Localized Object More...
 
 LocalizedObject (LocalizedObject other)
 Creates a new Localized Object from another More...
 
string GetFullKey (string parsedKey)
 Gets the full key value with identifiers and everything More...
 

Static Public Member Functions

static LocalizedObjectType GetLocalizedObjectType (string key)
 Gets the LocalizedObjectType of the localized object. More...
 
static string GetCleanKey (string key, LocalizedObjectType objectType)
 Gets the clean key. i.e the key without a type identifier "<type=TEXTURE>" etc. More...
 
static string GetCleanKey (string key)
 Gets the clean key. i.e the key without a type identifier "[type=TEXTURE]" etc. More...
 
static string GetFullKey (string parsedKey, LocalizedObjectType objectType)
 Gets the full key value with identifiers and everything More...
 
static string GetLocalizedObjectTypeStringValue (LocalizedObjectType objectType)
 Performs a manual ToString() on a LocalizedObjectType enum since ToString() is not allowed on WebPlayer platforms. More...
 

Static Public Attributes

static readonly string keyTypeIdentifier = "[type="
 All keys that are not a string will begin with this identifier for example - if the localized object is an audio file, the key will begin with <type=AUDIO> regular text strings will not begin with any type of identifier More...
 

Properties

LocalizedObjectType ObjectType [get, set]
 Gets or sets the LocalizedObjectType of the object. More...
 
string TextValue [get, set]
 Gets or sets the text value. More...
 
GameObject ThisGameObject [get, set]
 Variable if this object type is GAME_OBJECT. Gets or sets the this game object. More...
 
AudioClip ThisAudioClip [get, set]
 Variable if this object type is AUDIO. Gets or sets the this AudioClip. More...
 
Texture ThisTexture [get, set]
 Variable if this object type is TEXTURE. Gets or sets the this Texture. Can be used with MovieTexture(Pro-only feature) More...
 
bool OverrideLocalizedObject [get, set]
 Gets or sets if this object should use an asset from a different language. More...
 
string OverrideObjectLanguageCode [get, set]
 If overrideLocalizedObject is true, this gets or sets the language code that it will use to get the other language. More...
 

Detailed Description

The localized object, used to determine what type the string value from the .resx file is

Constructor & Destructor Documentation

SmartLocalization.LocalizedObject.LocalizedObject ( )

Creates a new Localized Object

SmartLocalization.LocalizedObject.LocalizedObject ( LocalizedObject  other)

Creates a new Localized Object from another

Parameters
otherThe object to copy

Member Function Documentation

static string SmartLocalization.LocalizedObject.GetCleanKey ( string  key,
LocalizedObjectType  objectType 
)
static

Gets the clean key. i.e the key without a type identifier "<type=TEXTURE>" etc.

Returns
The clean key without the type identifier
Parameters
keyThe key language value
objectTypeThe LocalizedObjectType of the key
static string SmartLocalization.LocalizedObject.GetCleanKey ( string  key)
static

Gets the clean key. i.e the key without a type identifier "[type=TEXTURE]" etc.

Returns
The clean key without the type identifier
Parameters
keyThe full key with the type identifier
string SmartLocalization.LocalizedObject.GetFullKey ( string  parsedKey)

Gets the full key value with identifiers and everything

Returns
The full key.
Parameters
parsedKeyParsed key. (Clean key originally from GetCleanKey)
static string SmartLocalization.LocalizedObject.GetFullKey ( string  parsedKey,
LocalizedObjectType  objectType 
)
static

Gets the full key value with identifiers and everything

Returns
The full key.
Parameters
parsedKeyParsed key. (Clean key originally from GetCleanKey)
static LocalizedObjectType SmartLocalization.LocalizedObject.GetLocalizedObjectType ( string  key)
static

Gets the LocalizedObjectType of the localized object.

Returns
The LocalizedObjectType of the key value
Parameters
keyThe language key from the .resx file
static string SmartLocalization.LocalizedObject.GetLocalizedObjectTypeStringValue ( LocalizedObjectType  objectType)
static

Performs a manual ToString() on a LocalizedObjectType enum since ToString() is not allowed on WebPlayer platforms.

Parameters
objectTypeThe enumeration to get the string value from.
Returns
The string value of the localized object type enumeration

Member Data Documentation

readonly string SmartLocalization.LocalizedObject.keyTypeIdentifier = "[type="
static

All keys that are not a string will begin with this identifier for example - if the localized object is an audio file, the key will begin with <type=AUDIO> regular text strings will not begin with any type of identifier

Property Documentation

LocalizedObjectType SmartLocalization.LocalizedObject.ObjectType
getset

Gets or sets the LocalizedObjectType of the object.

bool SmartLocalization.LocalizedObject.OverrideLocalizedObject
getset

Gets or sets if this object should use an asset from a different language.

string SmartLocalization.LocalizedObject.OverrideObjectLanguageCode
getset

If overrideLocalizedObject is true, this gets or sets the language code that it will use to get the other language.

string SmartLocalization.LocalizedObject.TextValue
getset

Gets or sets the text value.

The text value of the object, all objects are converted into string values in the end, whether it's a file path or a simple string value.

AudioClip SmartLocalization.LocalizedObject.ThisAudioClip
getset

Variable if this object type is AUDIO. Gets or sets the this AudioClip.

This AudioClip.

GameObject SmartLocalization.LocalizedObject.ThisGameObject
getset

Variable if this object type is GAME_OBJECT. Gets or sets the this game object.

The this game object.

Texture SmartLocalization.LocalizedObject.ThisTexture
getset

Variable if this object type is TEXTURE. Gets or sets the this Texture. Can be used with MovieTexture(Pro-only feature)


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