Skip to content

Files

Latest commit

29fd14a · Mar 3, 2025

History

History
This branch is 20 commits behind openmrs/openmrs-esm-core:main.

esm-translations

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 18, 2025
Feb 24, 2025
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Apr 20, 2024
Mar 3, 2025
Mar 19, 2024
Mar 19, 2024

@openmrs/esm-translations

This framework library supports translations that can be used throughout the O3 application.

Use translations with getCoreTranslation. The translations are in the core namespace.

Under the hood

Translation key-value pairs are kept in src/translations.ts. The keys in that file are used to generate the CoreTranslationKey type, which allows Typescript to tell developers whether a key is in the core translations or not. The values are used by the getCoreTranslation function, so no default needs to be provided.

A custom i18next-parser lexer is defined so that the extract-translations script pulls translation strings directly out of this translations.ts file.