The Language class manges the language files and entries and stores the LanguageEntry objects in a map.  
 More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/Language.h>
 | 
| static std::string  | getFilename (const std::string &language) | 
|   | Creates the name of the language file out of the languages name.  More...
  | 
|   | 
The Language class manges the language files and entries and stores the LanguageEntry objects in a map. 
- See also
 - See Language.h for some examples. 
 
 
      
        
          | orxonox::Language::Language  | 
          ( | 
           | ) | 
           | 
        
      
 
Constructor: Reads the default language file and sets some values. 
 
 
      
        
          | orxonox::Language::~Language  | 
          ( | 
           | ) | 
           | 
        
      
 
Destructor: Deletes all language entries. 
 
 
  
  
      
        
          | orxonox::Language::Language  | 
          ( | 
          const Language &  | 
           | ) | 
           | 
         
       
   | 
  
privatedelete   | 
  
 
 
Adds a new LanguageEntry, if it's not already existing. 
- Parameters
 - 
  
    | label | The label of the entry  | 
    | entry | The default entry  | 
  
   
 
 
Creates a new LanguageEntry with a given label and a given default entry. 
- Parameters
 - 
  
    | label | The label of the entry  | 
    | entry | The default entry  | 
  
   
- Returns
 - The created LanguageEntry object 
 
 
 
  
  
      
        
          | std::string orxonox::Language::getFilename  | 
          ( | 
          const std::string &  | 
          language | ) | 
           | 
         
       
   | 
  
staticprivate   | 
  
 
Creates the name of the language file out of the languages name. 
- Parameters
 - 
  
    | language | The name of the language  | 
  
   
- Returns
 - The filename 
 
 
 
      
        
          | const std::string & orxonox::Language::getLocalisation  | 
          ( | 
          const LanguageEntryLabel &  | 
          label,  | 
        
        
           | 
           | 
          bool  | 
          bError = true  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Returns the localisation of a given entry. 
- Parameters
 - 
  
    | label | The label of the entry  | 
    | bError | If true, an error is printed if the label doesn't exist and the default localisation is returned. If false, no error is printed and an empty string is returned.  | 
  
   
- Returns
 - The localisation 
 
 
 
  
  
      
        
          | void orxonox::Language::readDefaultLanguageFile  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Reads the default language file and creates a LanguageEntry objects for every entry. 
 
 
  
  
      
        
          | bool orxonox::Language::readTranslatedLanguageFile  | 
          ( | 
          const std::string &  | 
          language | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Reads the language file of the configured language and assigns the localisation to the corresponding LanguageEntry object. 
- Returns
 - Returns false if the language file couldn't be found. 
 
 
 
  
  
      
        
          | void orxonox::Language::writeDefaultLanguageFile  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
private   | 
  
 
Writes all default entries to the default language file. 
 
 
  
  
      
        
          | std::string orxonox::Language::defaultLanguage_ | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | std::string orxonox::Language::defaultLocalisation_ | 
         
       
   | 
  
private   | 
  
 
The returned string, if an entry unavailable entry is requested. 
 
 
  
  
      
        
          | std::map<std::string, LanguageEntry*> orxonox::Language::languageEntries_ | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Language * orxonox::Language::singletonPtr_s = nullptr | 
         
       
   | 
  
staticprivate   | 
  
 
 
The documentation for this class was generated from the following files: