How to add a new translation
Categories:
Add new translation
For adding a new language to the SIDRE frontend and metadata, you need to extend the frontend-labels, the vocabularies and the multilingual search.
Frontend-Labels
Please create a new Issue in sidre-frontend for this with title Add translation into <YOUR-LANGUAGE>
- Create a new folder for the ISO-639-1 code of the new language under https://gitlab.com/oersi/sidre/sidre-frontend/-/tree/master/public/locales
- Create a
translation.json
inside of the new folder and translate all the labels in this file (exceptHEADER
andMETA
labels). Template for this may be public/locales/en/translation.json - Create a
language.json
inside of the new folder. Can be created via get-language-labels.py (uses Wikidata). - In
public/locales/common/translation.json
: addHEADER.CHANGE_LANGUAGE
-entry for the new language. Please use the new language as label.
Vocabularies
The ttl
-files of all vocabularies used by OERSI needs to be extended: there needs to be an additional entry in the skos:prefLabel
for the new language for every skos:Concept
-entry.
Example:
skos:prefLabel "Softwareanwendung"@de, "Software Application"@en, "TRANSLATE ME"@<YOUR-NEW-ISO639-1-CODE> .
Vocabularies:
- https://purl.org/dcx/lrmi-vocabs/educationalAudienceRole
- https://raw.githubusercontent.com/dini-ag-kim/educationalLevel/main/educationalLevel.ttl
- https://raw.githubusercontent.com/dini-ag-kim/hcrt/master/hcrt.ttl
- https://raw.githubusercontent.com/dini-ag-kim/hochschulfaechersystematik/master/hochschulfaechersystematik.ttl
- https://raw.githubusercontent.com/dini-ag-kim/value-lists/main/conditionsOfAccess.ttl
external contributers: Please attach these files to your Merge-Request/issue.
SIDRE-team: Please create a PullRequest directly in the corresponding github-repositories.
Synonyms for Multilingual Search
SIDRE-instance-team: we need to add the new language to the Synonyms-process (example-file and/or automatic-process) in order to use the language in the multilingual search. For this: add the new language code to the ansible-variable internationalization_tool_search_index_output_languages
.