Skip to content
Snippets Groups Projects
Commit 243a5008 authored by Jack Reed's avatar Jack Reed
Browse files

Add info for help w/ translations fixes #2806

parent 986b6171
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@
## For Mirador Users
You can quickly use and configure Mirador by remixing the [mirador-start](https://mirador-start.glitch.me/) Glitch.
## Adding translations to Mirador
For help with adding a translation, see [src/locales/README.md](src/locales/README.md)
## Running Mirador locally
Mirador local development requires [nodejs](https://nodejs.org/en/download/) to be installed.
......
# Contributing a Mirador translation
Mirador is built with internationalization and translation support. It uses a translation file and [react-i18next](https://react.i18next.com/) to provide translations in user interface elements.
## Getting started
To contribute a new language to Mirador, you will need to convert the strings contained in [en/translation.json](en/translation.json) to the target language.
So we would want to create a directory for the target language using the iso language code that copies from the `en/translation.json` file. e.g. `fr/translation.json`.
```sh
$ mkdir src/locales/fr && cp src/locales/en/translation.json src/locales/fr/translation.json
```
For example, this subset of the English file:
```javascript
// src/locales/en/translation.json
{
"translation": {
"aboutThisItem": "About this item",
"addedFromUrl": "(Added from URL)",
"addManifestUrl": "Resource location",
"addManifestUrlHelp": "The URL of a IIIF resource",
"addResource": "Add resource",
"annotationCanvasLabel_1/1": "Item: [{{label}}]",
...
```
Would look like this in French.
```javascript
// src/locales/fr/translation.json
{
"translation": {
"aboutThisItem": "A propos de cet item",
"addedFromUrl": "(Ajouté depuis une URL)",
"addManifestUrl": "Emplacement de la ressource",
"addManifestUrlHelp": "L'URL de la ressource IIIF",
"addResource": "Ajouter une ressource",
"annotationCanvasLabel_1/1": "Item: [{{label}}]",
...
```
Strings contained in double curly braces `{{}}` should not be changed.
The [`i18n.js`](../i18n.js) file should also be updated for the new language.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment