mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 10:26:15 -04:00
feat(i18n) Custom i18n strings (#4000)
* Custom i18n strings (and some code formatting) * Documentation for per-instance l10n overwrites
This commit is contained in:
parent
170f471299
commit
61c7bb9699
7 changed files with 54 additions and 6 deletions
|
@ -92,3 +92,23 @@ For example, if you want to replace `Chat` with `Notes`, simply add...
|
|||
, "pad.chat": "Notes"
|
||||
}
|
||||
```
|
||||
|
||||
## Customization for Administrators
|
||||
|
||||
As an Etherpad administrator, it is possible to overwrite core mesages as well as messages in plugins. These include error messages, labels, and user instructions. Whereas the localization in the source code is in separate files separated by locale, an administrator's custom localizations are in `settings.json` under the `customLocaleStrigns` key, with each locale separated by a sub-key underneath.
|
||||
|
||||
For example, let's say you want to change the text on the "New Pad" button on Etherpad's home page. If you look in `locales/en.json` (or `locales/en-gb.json`) you'll see the key for this text is `"index.newPad"`. You could add the following to `settings.json`:
|
||||
|
||||
```
|
||||
"customLocaleStrings": {
|
||||
"fr": {
|
||||
"index.newPad": "Créer un document"
|
||||
},
|
||||
"en-gb": {
|
||||
"index.newPad": "Create a document"
|
||||
},
|
||||
"en": {
|
||||
"index.newPad": "Create a document"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue