RigsofRods
Soft-body Physics Simulation
Language.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2020 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
25 
26 #pragma once
27 
28 #include "Application.h"
29 
30 #include <OgreUTFString.h>
31 
32 // three configurations currently supported:
33 // #define NOLANG = no language translations at all, removes any special parsing tags
34 // #define USE_MOFILEREADER = windows gettext replacement
35 
36 # define U(str) Ogre::UTFString(L##str)
37 
38 // using mofilereader as gettext replacement
39 #include <moFileReader.hpp>
40 
41 #define _L(str) moFileLib::moFileReaderSingleton::GetInstance().Lookup(str).c_str()
42 #define _LC(ctx,str) moFileLib::moFileReaderSingleton::GetInstance().LookupWithContext(ctx,str).c_str()
43 
44 namespace RoR {
45 
48 
50 {
51 public:
52  void setup();
53 
54  std::vector<std::pair<std::string, std::string>> getLanguages() { return languages; };
55 
56 private:
57  std::vector<std::pair<std::string, std::string>> languages;
58 };
59 
61 
62 } // namespace RoR
63 
RoR::LanguageEngine::languages
std::vector< std::pair< std::string, std::string > > languages
Definition: Language.h:54
RoR::LanguageEngine::getLanguages
std::vector< std::pair< std::string, std::string > > getLanguages()
Definition: Language.h:54
Application.h
Central state/object manager and communications hub.
RoR::LanguageEngine
Definition: Language.h:49
RoR
Definition: AppContext.h:36
RoR::LanguageEngine::setup
void setup()
Definition: Language.cpp:48