localize: add getString() function for a smoother string handling

Origin commit data
------------------
Commit: 83af9d836c
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-05-29 (Mon, 29 May 2017)

Origin message was:
------------------
- localize: add getString() function for a smoother string handling
This commit is contained in:
vanhofen
2017-05-29 11:49:00 +02:00
parent ec0a5de898
commit 9781410067
2 changed files with 7 additions and 0 deletions

View File

@@ -251,6 +251,12 @@ const char * CLocaleManager::getText(const neutrino_locale_t keyName) const
return localeData[keyName]; return localeData[keyName];
} }
//NI
std::string CLocaleManager::getString(const neutrino_locale_t keyName) const
{
return (std::string) localeData[keyName];
}
static const neutrino_locale_t locale_weekday[7] = static const neutrino_locale_t locale_weekday[7] =
{ {
LOCALE_DATE_SUN, LOCALE_DATE_SUN,

View File

@@ -69,6 +69,7 @@ class CLocaleManager
loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false); loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false);
const char * getText(const neutrino_locale_t keyName) const; const char * getText(const neutrino_locale_t keyName) const;
std::string getString(const neutrino_locale_t keyName) const; //NI
static neutrino_locale_t getMonth (const struct tm * struct_tm_p); static neutrino_locale_t getMonth (const struct tm * struct_tm_p);
static neutrino_locale_t getMonth (const int mon); static neutrino_locale_t getMonth (const int mon);