Candy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Attributes | Friends | List of all members
Candy::I18N Class Reference

I18n is a abbreviation of Internationalization, which is the collective name for systems that facilitates the support for multiple languages of a game or application. More...

Inheritance diagram for Candy::I18N:
Inheritance graph
[legend]

Classes

struct  Update
 

Public Member Functions

 I18N (H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< H3D::MFString > _url=0, H3D::Inst< H3D::MFString > _language=0, H3D::Inst< Update > _update=0)
 
void initialize ()
 
- Public Member Functions inherited from H3D::H3DDynamicFieldsObject
virtual bool addField (const string &name, const Field::AccessType &access, Field *field)
 
virtual bool removeField (const string &_name)
 
virtual void clearFields ()
 

Public Attributes

std::auto_ptr< H3D::MFStringlanguage
  (input only) The languages to use in descending priority. More...
 

Static Public Attributes

static H3D::H3DNodeDatabase database
 

Protected Types

typedef std::map< std::string,
std::string > 
fields_t
 
typedef std::map< std::string,
fields_t > 
langs_t
 

Protected Attributes

langs_t languages
 
std::auto_ptr< Updateupdate
 

Friends

struct Update
 

Detailed Description

I18n is a abbreviation of Internationalization, which is the collective name for systems that facilitates the support for multiple languages of a game or application.

This provides strings for buttons, menus and such and reads this data from an XML file with multilingual strings.

X3D Interface

 NameTypeDefault valueDescription
url MFString   ""   The file to read language specific strings from.  
language MFString   "en"   The languages to use in descending priority. If a field is specified only in a language of lower priority, this language's value will be used.  
SFString   ""   Every field specified in the language field maps to a field of this node. Each such field can then be routed to a user interface component or something similar.  
_M MFString   []   Every string field has a string array equivalent containing zero elements if no string is specified for the field and language, or one element for each line of the language string. This field has the same name as the single string value, but with the suffix '_M'.  

Member Data Documentation

std::auto_ptr< H3D::MFString > Candy::I18N::language

(input only) The languages to use in descending priority.

If a field is specified only in a language of lower priority, this language's value will be used.