mirror of https://github.com/kiwix/libkiwix.git
Expose i18n translation API to tools.h
This commit is contained in:
parent
ece40966f1
commit
22c54adb58
|
@ -282,5 +282,14 @@ FeedCategories readCategoriesFromFeed(const std::string& content);
|
|||
* @return full language name.
|
||||
*/
|
||||
std::string getLanguageSelfName(const std::string& lang);
|
||||
|
||||
/**
|
||||
* Retrieve the translation corresponding to key in language lang
|
||||
*
|
||||
* @param lang ISO 639-3 language code.
|
||||
* @param key translation key string
|
||||
* @return translated key
|
||||
*/
|
||||
std::string getTranslatedString(const std::string& lang, const std::string& key);
|
||||
}
|
||||
#endif // KIWIX_TOOLS_H
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef KIWIX_SERVER_I18N
|
||||
#define KIWIX_SERVER_I18N
|
||||
|
||||
#include <tools.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <mustache.hpp>
|
||||
|
@ -40,8 +41,6 @@ struct I18nStringTable {
|
|||
const char* get(const std::string& key) const;
|
||||
};
|
||||
|
||||
std::string getTranslatedString(const std::string& lang, const std::string& key);
|
||||
|
||||
namespace i18n
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue