____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

translate.cpp File Reference

Translate languages. More...

#include "stratagus.h"
#include <map>
#include <string>
#include "translate.h"
#include "iolib.h"

Go to the source code of this file.

Typedefs

typedef std::map< std::string,
std::string > 
EntriesType

Functions

const char * Translate (const char *str)
 < Translate a string
void AddTranslation (const std::string &str1, const std::string &str2)
 Load a .po file.
void LoadPO (const std::string &file)
 Set the stratagus and game translations.
void SetTranslationsFiles (const std::string &stratagusfile, const std::string &gamefile)

Variables

static EntriesType Entries
std::string StratagusTranslation
 The PO containing the translations for the stratagus engine.
std::string GameTranslation
 The PO containing the translations for the game itself.


Detailed Description

Translate languages.

Definition in file translate.cpp.


Typedef Documentation

typedef std::map<std::string, std::string> EntriesType

Definition at line 47 of file translate.cpp.


Function Documentation

void AddTranslation ( const std::string &  str1,
const std::string &  str2 
)

Load a .po file.

Add a translation

Definition at line 72 of file translate.cpp.

References Entries.

Referenced by LoadPO(), and tolua_stratagus_AddTranslation00().

void LoadPO ( const std::string &  file  ) 

Set the stratagus and game translations.

Load a .po file

Definition at line 84 of file translate.cpp.

References AddTranslation(), and LibraryFileName().

Referenced by SetTranslationsFiles(), and tolua_stratagus_LoadPO00().

void SetTranslationsFiles ( const std::string &  stratagusfile,
const std::string &  gamefile 
)

Set the stratagus and game translations

Those filenames will be saved in the preferences when SavePreferences will be called.

Definition at line 194 of file translate.cpp.

References GameTranslation, LoadPO(), and StratagusTranslation.

Referenced by tolua_stratagus_SetTranslationsFiles00().

const char* Translate ( const char *  str  ) 

< Translate a string

Translate a string

Definition at line 59 of file translate.cpp.

References Entries.

Referenced by tolua_stratagus__00(), and tolua_stratagus_Translate00().


Variable Documentation

EntriesType Entries [static]

Definition at line 48 of file translate.cpp.

Referenced by AddTranslation(), and Translate().

std::string GameTranslation

The PO containing the translations for the game itself.

Definition at line 50 of file translate.cpp.

Referenced by SetTranslationsFiles(), tolua_get_GameTranslation(), and tolua_set_GameTranslation().

std::string StratagusTranslation

The PO containing the translations for the stratagus engine.

Definition at line 49 of file translate.cpp.

Referenced by SetTranslationsFiles(), tolua_get_StratagusTranslation(), and tolua_set_StratagusTranslation().


Generated on Sat Feb 21 00:28:21 2009 for Bos Wars by  doxygen 1.5.6