LLTrans Class Reference

Localized strings class This class is used to retrieve translations of strings used to build larger ones, as well as strings with a general usage that don't belong to any specific floater. For example, "Owner:", "Retrieving..." used in the place of a not yet known name, etc. More...

#include <lltrans.h>

List of all members.

Public Member Functions

 LLTrans ()

Static Public Member Functions

static bool parseStrings (const LLString &xml_filename)
 Parses the xml file that holds the strings. Used once on startup.
static LLString getString (const LLString &xml_desc, const LLString::format_map_t &args)
 Returns a translated string.
static LLString getString (const LLString &xml_desc)
 Returns a translated string.

Private Types

typedef std::map< LLString,
LLTransTemplate
template_map_t

Static Private Attributes

static template_map_t sStringTemplates


Detailed Description

Localized strings class This class is used to retrieve translations of strings used to build larger ones, as well as strings with a general usage that don't belong to any specific floater. For example, "Owner:", "Retrieving..." used in the place of a not yet known name, etc.

Definition at line 55 of file lltrans.h.


Member Typedef Documentation

typedef std::map<LLString, LLTransTemplate > LLTrans::template_map_t [private]

Definition at line 88 of file lltrans.h.


Constructor & Destructor Documentation

LLTrans::LLTrans (  ) 


Member Function Documentation

bool LLTrans::parseStrings ( const LLString xml_filename  )  [static]

Parses the xml file that holds the strings. Used once on startup.

Parameters:
xml_filename Filename to parse
Returns:
true if the file was parsed successfully, true if something went wrong

Definition at line 44 of file lltrans.cpp.

References LLUICtrlFactory::getLayeredXMLNode(), LLPointer< Type >::isNull(), llendl, llerrs, llwarns, NULL, and sStringTemplates.

Referenced by LLAppViewer::initWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

LLString LLTrans::getString ( const LLString xml_desc,
const LLString::format_map_t args 
) [static]

Returns a translated string.

Parameters:
xml_desc String's description
args A list of substrings to replace in the string
Returns:
Translated string

Definition at line 79 of file lltrans.cpp.

References LLStringBase< char >::format(), llendl, llerrs, llwarns, NULL, LLAlertDialog::showXml(), and sStringTemplates.

Referenced by LLAnimStateLabels::getStateLabel(), getString(), idle_startup(), and LLHoverView::updateText().

Here is the call graph for this function:

Here is the caller graph for this function:

static LLString LLTrans::getString ( const LLString xml_desc  )  [inline, static]

Returns a translated string.

Parameters:
xml_desc String's description
Returns:
Translated string

Definition at line 80 of file lltrans.h.

References getString().

Here is the call graph for this function:


Member Data Documentation

Definition at line 89 of file lltrans.h.

Referenced by getString(), and parseStrings().


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

Generated on Fri May 16 09:18:33 2008 for SecondLife by  doxygen 1.5.5