Moved C++ tools out
This commit is contained in:
26
archive/dawntools/util/Language.hpp
Normal file
26
archive/dawntools/util/Language.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "util/Xml.hpp"
|
||||
#include "util/File.hpp"
|
||||
|
||||
struct LanguageString {
|
||||
std::string key;
|
||||
std::string lang;
|
||||
std::string text;
|
||||
};
|
||||
|
||||
/**
|
||||
* Shorthand method to save a list of languages to a file.
|
||||
*
|
||||
* @param languagesDir Directory where the language(s) are to be stored.
|
||||
* @param strings List of strings to store.
|
||||
* @return 0 for success, otherwise for failure.
|
||||
*/
|
||||
static int32_t languageSaveStrings(
|
||||
std::string languagesDir,
|
||||
std::vector<struct LanguageString> strings
|
||||
);
|
Reference in New Issue
Block a user