mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Doc: Plugin translations
This commit is contained in:
@@ -244,6 +244,17 @@ Adminer generates simple HTML and styles it with basic CSS, respecting user pref
|
|||||||
Users can customize styles via `adminer.css`.
|
Users can customize styles via `adminer.css`.
|
||||||
If styling an element without a class name is difficult, I generally accept patches that add meaningful class names.
|
If styling an element without a class name is difficult, I generally accept patches that add meaningful class names.
|
||||||
|
|
||||||
|
## Translations
|
||||||
|
|
||||||
|
All user-visible strings should be translatable using `lang('')`.
|
||||||
|
This extracts them for translation and applies translations if available.
|
||||||
|
|
||||||
|
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
|
||||||
|
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
|
||||||
|
|
||||||
|
Plugins extending [`Adminer\Plugin`](/adminer/include/plugin.inc.php) can use `$this->lang()` and store translations in `static $translations = array('en' => array('' => 'Plugin description'))`.
|
||||||
|
The website translations are managed at https://www.adminer.org/en/translations/.
|
||||||
|
|
||||||
## Compilation
|
## Compilation
|
||||||
|
|
||||||
Adminer’s source code is divided into a manageable number of reasonably small files.
|
Adminer’s source code is divided into a manageable number of reasonably small files.
|
||||||
@@ -273,15 +284,6 @@ I do not review logs with this information, and no one else has access to the se
|
|||||||
A [plugin](/plugins/version-noverify.php) disables version checks, but users should verify versions by other means to ensure security updates.
|
A [plugin](/plugins/version-noverify.php) disables version checks, but users should verify versions by other means to ensure security updates.
|
||||||
There's also a [plugin](/plugins/version-github.php) checking for new versions [from GitHub](https://github.com/vrana/adminer/releases).
|
There's also a [plugin](/plugins/version-github.php) checking for new versions [from GitHub](https://github.com/vrana/adminer/releases).
|
||||||
|
|
||||||
## Translations
|
|
||||||
|
|
||||||
All user-visible strings should be translatable using `lang('')`.
|
|
||||||
This extracts them for translation and applies translations if available.
|
|
||||||
|
|
||||||
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
|
|
||||||
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
|
|
||||||
The website translations are managed separately via Google Sheets.
|
|
||||||
|
|
||||||
## Commits
|
## Commits
|
||||||
|
|
||||||
Every commit should do only one thing and be as small as possible.
|
Every commit should do only one thing and be as small as possible.
|
||||||
|
Reference in New Issue
Block a user