Multi-language Support
This page is a stub. Help us expand it!
Overview
Unraid supports multiple languages through a translation system. Plugins can provide localized strings using the _() function.
The Translation Function
<?
// Basic usage
echo _("Hello World");
// With variables (sprintf-style)
echo sprintf(_("Welcome, %s"), $username);
?>
Language File Structure
TODO: Document the language file format and location
/usr/local/emhttp/languages/
├── en_US/
│ └── YourPlugin.txt
├── de_DE/
│ └── YourPlugin.txt
└── ...
Creating Language Files
TODO: Document the format of .txt language files
; Example language file format
Hello World=Hello World
Welcome, %s=Welcome, %s
Translation Best Practices
TODO: Document best practices for translatable strings
- Use descriptive keys
- Keep placeholders consistent
- Provide context comments
Related Topics
- Page Files - UI pages where translations are used
References
- Dynamix language files - Examples of language file structure