i18n: English/German from Switch system language
- Add I18n module: German when system language is DE, else English (ENUS/ENGB or any other language). - Translate UI strings (tabs, settings, about, file browser, notifications, OC row titles, toggles Ein/Aus). - Keep toggle/frequency/voltage list rows without subtitle descriptions like before. Uses setGetSystemLanguage + setMakeLanguage; call I18n::init before Application::init. Made-with: Cursor
This commit is contained in:
57
src/i18n.h
Normal file
57
src/i18n.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
SWR INI Tool - Switchroot INI Configuration Editor
|
||||
Copyright (C) 2026 Switchroot
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace I18n
|
||||
{
|
||||
|
||||
void init();
|
||||
|
||||
bool isGerman();
|
||||
|
||||
const char* appTitle();
|
||||
|
||||
const char* tabSettings();
|
||||
const char* tabAbout();
|
||||
|
||||
const char* wordOn();
|
||||
const char* wordOff();
|
||||
|
||||
std::string sectionEditLine(const std::string& section, const std::string& path);
|
||||
|
||||
const char* headerToggleOptions();
|
||||
const char* headerFrequencySettings();
|
||||
const char* headerVoltageSettings();
|
||||
const char* headerOther();
|
||||
const char* headerIniFilePaths();
|
||||
const char* headerLinksAndResources();
|
||||
|
||||
const char* errorListItemTitleIni();
|
||||
std::string iniLoadErrorBody(const std::string& path);
|
||||
std::string iniSectionErrorBody(const std::string& path, const std::string& osName);
|
||||
|
||||
const char* notifyConfigSaved();
|
||||
const char* notifyConfigSaveError();
|
||||
const char* notifyPathUpdated();
|
||||
|
||||
const char* settingsIntro();
|
||||
|
||||
const char* pathListDescriptionLakka();
|
||||
|
||||
const char* fileBrowserTitlePrefix();
|
||||
std::string fileBrowserNoIni(const std::string& dir);
|
||||
|
||||
const char* aboutSubtitle();
|
||||
const char* aboutCopyright();
|
||||
const char* aboutLinks();
|
||||
|
||||
const char* ocBoolLabel(const std::string& key);
|
||||
const char* ocFreqLabel(const std::string& key);
|
||||
const char* ocVoltageLabel(const std::string& key);
|
||||
|
||||
} // namespace I18n
|
||||
Reference in New Issue
Block a user