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

translate.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 2005 by Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef __TRANSLATE_H__
31 #define __TRANSLATE_H__
32 
34 
35 /*----------------------------------------------------------------------------
36 -- Functions
37 ----------------------------------------------------------------------------*/
38 
40 extern const char *Translate(const char *str);
42 extern void AddTranslation(const char *str1, const char *str2);
44 extern void LoadPO(const char *file);
46 extern void SetTranslationsFiles(const char *stratagusfile, const char *gamefile);
47 
48 #define _(str) Translate(str)
49 #define N_(str) str
50 
52 
53 #endif // !__TRANSLATE_H__
54 
SetTranslationsFiles
void SetTranslationsFiles(const char *stratagusfile, const char *gamefile)
Set the stratagus and game translations.
Definition: translate.cpp:183
LoadPO
void LoadPO(const char *file)
Load a .po file.
Definition: translate.cpp:80
Translate
const char * Translate(const char *str)
Translate a string.
Definition: translate.cpp:59
AddTranslation
void AddTranslation(const char *str1, const char *str2)
Add a translation.
Definition: translate.cpp:72
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.