Deskflow 1.25.0.128
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
I18N Class Reference

The I18N singleton class handles detection and loading of translation files. More...

#include <I18N.h>

Inheritance diagram for I18N:
Collaboration diagram for I18N:

Signals

void languageChanged (const QString language)
 languageChanged Emitted when the current language changes
void languagesChanged (const QStringList languages)
 languagesChanged Emitted when the detected languages changes

Static Public Member Functions

static I18Ninstance ()
static QStringList detectedLanguages ()
 detectedLanguages
static QString nativeTo639Name (QString nativeName)
 nativeTo639Name Convert a native Language name into a 639 name
static QString toNativeName (QString shortName)
 toNativeName Convert a 639 Name into a Native Language string
static QString currentLanguage ()
 currentLanguage
static void setLanguage (const QString &langName)
 setLanguage Sets the current language
static void reDetectLanguages ()
 detectLanguages Detect new language files

Detailed Description

The I18N singleton class handles detection and loading of translation files.

Member Function Documentation

◆ currentLanguage()

QString I18N::currentLanguage ( )
static

currentLanguage

Returns
The current language string (639-1 names i.e en, es)

◆ detectedLanguages()

QStringList I18N::detectedLanguages ( )
static

detectedLanguages

Returns
List of detected languages (native names: English, Español etc..)

◆ instance()

I18N * I18N::instance ( )
static

◆ languageChanged

void I18N::languageChanged ( const QString language)
signal

languageChanged Emitted when the current language changes

Parameters
languageThe current language (639-1 names i.e en, es)

◆ languagesChanged

void I18N::languagesChanged ( const QStringList languages)
signal

languagesChanged Emitted when the detected languages changes

Parameters
languagesThe current list of languages (639-1 names i.e en, es)

◆ nativeTo639Name()

QString I18N::nativeTo639Name ( QString nativeName)
static

nativeTo639Name Convert a native Language name into a 639 name

Parameters
nativeNameEnglish, Español etc..
Returns
639 name for the language e, zh_CN , it, etc..)

◆ reDetectLanguages()

void I18N::reDetectLanguages ( )
static

detectLanguages Detect new language files

◆ setLanguage()

void I18N::setLanguage ( const QString & langName)
static

setLanguage Sets the current language

Parameters
langNameThe language name must be an is 639-1 name

◆ toNativeName()

QString I18N::toNativeName ( QString shortName)
static

toNativeName Convert a 639 Name into a Native Language string

Parameters
shortNameA 639 name en, es etc...
Returns
native language string for the language

The documentation for this class was generated from the following files: