Nextcloud L10n helpers for apps and libraries.
npm i -S @nextcloud/l10n
In order to not break the l10n string extraction scripts, make sure to alias the imported function to match the legacy syntax:
import {translate as t, translatePlural as n} from '@nextcloud/l10n'
t('myapp', 'Hello!')
n('myapp', '%n cloud', '%n clouds', 100)
Generated using TypeDoc