$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

src/stratagus/translate.cpp File Reference

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

translate.cpp - Translate languages.

typedef std::map< std::string,
std::string > 
EntriesType
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.
const char * Translate (const char *str)
 Translate a string.
void AddTranslation (const char *str1, const char *str2)
 Add a translation.
void LoadPO (const char *file)
 Load a .po file.
void SetTranslationsFiles (const char *stratagusfile, const char *gamefile)
 Set the stratagus and game translations.

Typedef Documentation

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


Function Documentation

void AddTranslation ( const char *  str1,
const char *  str2 
)

Add a translation.

Add a translation

void LoadPO ( const char *  file  ) 

Load a .po file.

Load a .po file

void SetTranslationsFiles ( const char *  stratagusfile,
const char *  gamefile 
)

Set the stratagus and game translations.

Set the stratagus and game translations

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

const char* Translate ( const char *  str  ) 

Translate a string.

Translate a string


Variable Documentation

EntriesType Entries [static]

std::string GameTranslation

The PO containing the translations for the game itself.

std::string StratagusTranslation

The PO containing the translations for the stratagus engine.

(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.