Localization
Tablen supports multiple languages and provides a fully localized user interface.
Supported Languages
| Language | Code | Status |
|---|---|---|
| English | en | Fully supported (default) |
| Turkish (Turkce) | tr | Fully supported |
Changing the Language
In-App Setting
- Go to Settings > General > Language
- Select from:
- System Default: Uses your macOS system language
- English: Forces English regardless of system language
- Turkish: Forces Turkish regardless of system language
- Restart the app for the language change to take effect
How It Works
- The
appLanguagesetting is stored in@AppStorage("appLanguage") - When set to "system", Tablen removes the
AppleLanguagesoverride - When set to a specific language, Tablen sets
UserDefaultsAppleLanguagesto that language code - A restart is required because language resources are loaded at launch
Localized Content
UI Elements
All UI text is localized using Swift's String(localized:defaultValue:) pattern:
- Button labels
- Menu items
- Dialog titles and messages
- Setting labels and descriptions
- Error messages
- Tooltips and help text
- Empty state messages
Examples of Localized Strings
| Key | English | Turkish |
|---|---|---|
| settings.general | General | Genel |
| settings.appearance | Appearance | Gorunum |
| settings.plugins | Plugins | Eklentiler |
| settings.account | Account | Hesap |
| sidebar.noConnections | No connections yet | Henuz baglanti yok |
| palette.newTab | New Tab | Yeni Sekme |
| palette.executeQuery | Execute Query | Sorguyu Calistir |
Plugin Visibility Labels
Plugin visibility labels are also localized:
- Private: "Gizli" (TR)
- Public: "Herkese Acik" (TR)
- Team: "Takim" (TR)
String Externalization
All user-facing strings in the codebase use the localization system:
- Strings are defined with
String(localized:defaultValue:)for compile-time safety - Default values serve as the English translation
- Turkish translations are provided in the localization catalog
Best Practices for Contributors
When adding new strings:
- Use
String(localized: "key", defaultValue: "English text") - Choose descriptive, hierarchical keys (e.g., "settings.safety.enableSafeMode")
- Provide a clear English default value
- Add the Turkish translation to the localization catalog
Date and Number Formatting
- Dates use the system locale formatting
- Numbers follow the locale's decimal and thousands separators
- Relative dates (e.g., "2 hours ago") are localized through the system formatter
Right-to-Left (RTL) Support
Currently, Tablen supports left-to-right languages only (English and Turkish). RTL languages are not yet supported.
Contributing Translations
To contribute a new language translation:
- Identify all localized string keys in the codebase
- Provide translations for each key
- Test the translations in context
- Submit the translation catalog