20 #ifndef _STELLOCALEMGR_HPP_ 21 #define _STELLOCALEMGR_HPP_ 24 #include "StelCore.hpp" 52 void setAppLanguage(
const QString& newAppLangName,
bool refreshAll=
true);
69 void setSkyLanguage(
const QString& newSkyLangName,
bool refreshAll=
true);
100 void setDateFormatStr(
const QString& df) {dateFormat=stringToSDateFormat(df);}
160 STimeFormat stringToSTimeFormat(
const QString&)
const;
164 SDateFormat stringToSDateFormat(
const QString& df)
const;
167 static QMap<QString, QString> countryCodeToStringMap;
169 static void generateCountryList();
172 #endif // _STELLOCALEMGR_HPP_ const StelTranslator & getSkyTranslator() const
Get a reference to the StelTranslator object currently used for sky objects.
const QString & getTrueLocaleName() const
Get true translator locale name.
e.g. "05-07-1998" for July 5th 1998
Class used to translate strings to any language.
Use the system default date format.
e.g. "07-05-1998" for July 5th 1998
bool isAppRTL() const
Get the type (RTL or LTR) of application language currently used for GUI etc.
double getJdFromISO8601TimeLocal(const QString &str, bool *ok) const
Return the JD time for a local time ISO 8601 format that is: Y-m-dTH:M:S, but Y can be a large number...
void setTimeFormatStr(const QString &tf)
Set the time format from a format string.
QString getDateFormatStr(void) const
Get the format string which describes the current date format.
Manage i18n operations such as message translation and date/time localization.
Main class for Stellarium core processing.
use the system default format.
SDateFormat
The date display format.
static StelTranslator * globalTranslator
Used as a global translator by the whole app.
static QString countryNameToCode(const QString &countryName)
Convert a countryName to 2 letter country code. Returns "??" if not found.
const StelTranslator & getAppStelTranslator() const
Get the StelTranslator object currently used for global application.
static QString countryCodeToString(const QString &countryCode)
Convert a 2 letter country code to string. Returns empty string if countryCode unknown.
12 hour clock, e.g. "06:22:00 pm"
void setAppLanguage(const QString &newAppLangName, bool refreshAll=true)
Set the application language.
Define some translation macros.
QString getPrintableTimeZoneLocal(double JD) const
Get a localized, formatted string representation of the time zone of a Julian date.
bool isSkyRTL() const
Get the type (RTL or LTR) of language currently used for sky objects.
STimeFormat
The time display format.
QString getTimeFormatStr(void) const
Get the format string which describes the current time format.
QString getPrintableTimeLocal(double JD) const
Get a localized, formatted string representation of the time component of a Julian date...
QString getAppLanguage() const
Get the application language currently used for GUI etc.
void init()
Initialize object.
e.g. "1998-07-05" for July 5th 1998
static QStringList getAllCountryNames()
Return an alphabetically ordered list of all the known country names.
QString getQtDateFormatStr(void) const
Get the format string which describes the current date format (Qt style).
QString getPrintableDateLocal(double JD) const
Get a localized, formatted string representation of the date component of a Julian date...
QString getSkyLanguage() const
Get the language currently used for sky objects.
24 hour clock, e.g. "18:22:00"
void setSkyLanguage(const QString &newSkyLangName, bool refreshAll=true)
Set the sky language and reload the sky object names with the new translation.
QString getISO8601TimeLocal(double JD) const
Return the time in ISO 8601 format that is : Y-m-dTH:M:S.