From 829c3f35ec6016efbb27743a3c2448ce85539d87 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 May 2017 11:49:00 +0200 Subject: [PATCH] localize: add getString() function for a smoother string handling Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/83af9d836c7b2b7152a97812a7d3d397aefc85aa Author: vanhofen Date: 2017-05-29 (Mon, 29 May 2017) Origin message was: ------------------ - localize: add getString() function for a smoother string handling ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/localize.cpp | 6 ++++++ src/system/localize.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/system/localize.cpp b/src/system/localize.cpp index 63f562437..ec0b9db5f 100644 --- a/src/system/localize.cpp +++ b/src/system/localize.cpp @@ -251,6 +251,12 @@ const char * CLocaleManager::getText(const neutrino_locale_t keyName) const 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] = { LOCALE_DATE_SUN, diff --git a/src/system/localize.h b/src/system/localize.h index b12b430fd..f05e03be8 100644 --- a/src/system/localize.h +++ b/src/system/localize.h @@ -69,6 +69,7 @@ class CLocaleManager loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false); 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 int mon);