PixelLightAPI  .
Public Member Functions | Static Public Attributes
PLCore::LocalizationGroup Class Reference

Localization group. More...

#include <LocalizationGroup.h>

Inheritance diagram for PLCore::LocalizationGroup:
Inheritance graph
[legend]

List of all members.

Public Member Functions

String GetName () const
 Returns the name of the group.
String GetFromLanguage () const
 Returns the language used as 'from-key'.
void SetFromLanguage (const String &sFrom=English)
 Sets the language used as 'from-key'.
String GetToLanguage () const
 Returns the language used as 'to-key'.
void SetToLanguage (const String &sTo=English)
 Sets the language used as 'to-key'.
uint32 GetNumOfTexts () const
 Returns the number of texts.
LocalizationTextGetText (uint32 nIndex) const
 Returns a text by index.
LocalizationTextGetText (const String &sName) const
 Returns a text by name.
PLCORE_API LocalizationTextAddText (const String &sName, const String &sTranslation)
 Adds a new text.
PLCORE_API bool RemoveText (uint32 nIndex)
 Removes a text by index.
PLCORE_API bool RemoveText (const String &sName)
 Removes a text by name.
PLCORE_API void RemoveAllTexts ()
 Removes all texts.
virtual PLCORE_API bool Unload () override
 Unloads the loadable.
virtual PLCORE_API String GetLoadableTypeName () const override
 Returns the loadable type name.

Static Public Attributes

static PLCORE_API const String English

Detailed Description

Localization group.


Member Function Documentation

Returns the name of the group.

Returns:
The name of the group

Returns the language used as 'from-key'.

Returns:
The language used as 'from-key'
void PLCore::LocalizationGroup::SetFromLanguage ( const String sFrom = English) [inline]

Sets the language used as 'from-key'.

Parameters:
[in]sFromThe language used as 'from-key'

Returns the language used as 'to-key'.

Returns:
The language used as 'to-key'
void PLCore::LocalizationGroup::SetToLanguage ( const String sTo = English) [inline]

Sets the language used as 'to-key'.

Parameters:
[in]sToThe language used as 'to-key'
uint32 PLCore::LocalizationGroup::GetNumOfTexts ( ) const [inline]

Returns the number of texts.

Returns:
The number of texts
LocalizationText * PLCore::LocalizationGroup::GetText ( uint32  nIndex) const [inline]

Returns a text by index.

Parameters:
[in]nIndexIndex of the text
Returns:
The requested text, a null pointer on error
LocalizationText * PLCore::LocalizationGroup::GetText ( const String sName) const [inline]

Returns a text by name.

Parameters:
[in]sNameName of the text
Returns:
The requested text, a null pointer on error
PLCORE_API LocalizationText* PLCore::LocalizationGroup::AddText ( const String sName,
const String sTranslation 
)

Adds a new text.

Parameters:
[in]sNameName of the new text
[in]sTranslationThe translation of the text
Returns:
The new text, a null pointer on error (maybe there's already a text with the given name?)
PLCORE_API bool PLCore::LocalizationGroup::RemoveText ( uint32  nIndex)

Removes a text by index.

Parameters:
[in]nIndexIndex of the text
Returns:
'true' if all went fine, else 'false' (maybe there's no text with the given name?)
PLCORE_API bool PLCore::LocalizationGroup::RemoveText ( const String sName)

Removes a text by name.

Parameters:
[in]sNameName of the text
Returns:
'true' if all went fine, else 'false' (maybe there's no text with the given name?)

Removes all texts.

virtual PLCORE_API bool PLCore::LocalizationGroup::Unload ( ) [override, virtual]

Unloads the loadable.

Returns:
'true' if all went fine, else 'false'

Reimplemented from PLCore::Loadable.

virtual PLCORE_API String PLCore::LocalizationGroup::GetLoadableTypeName ( ) const [override, virtual]

Returns the loadable type name.

Returns:
The loadable type name

Reimplemented from PLCore::Loadable.


Member Data Documentation

PLCORE_API const String PLCore::LocalizationGroup::English [static]

"English" (default)


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:16
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported