1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00
OpenMW/components/translation/translation.hpp

38 lines
1.1 KiB
C++
Raw Normal View History

2012-12-23 19:23:24 +00:00
#ifndef COMPONENTS_TRANSLATION_DATA_H
#define COMPONENTS_TRANSLATION_DATA_H
#include <components/to_utf8/to_utf8.hpp>
#include <components/files/collections.hpp>
namespace TranslationData
{
class Storage
{
public:
void loadTranslationData(const Files::Collections& dataFileCollections,
const std::string& esmFileName);
std::string translateCellName(const std::string& cellName) const;
std::string topicID(const std::string& phrase) const;
void setEncoding (const ToUTF8::FromType& encoding);
2012-12-23 19:23:24 +00:00
private:
typedef std::map<std::string, std::string> ContainerType;
void loadData(ContainerType& container,
const std::string& fileNameNoExtension,
const std::string& extension,
const Files::Collections& dataFileCollections);
void loadDataFromStream(ContainerType& container, std::istream& stream);
ToUTF8::FromType mEncoding;
std::map<std::string, std::string> mCellNamesTranslations, mTopicIDs, mPhraseForms;
};
}
#endif