Skip to content

whatever-company/elium-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eb55152 Β· Mar 15, 2024
Mar 15, 2024
Mar 15, 2024
Mar 15, 2024
Jan 22, 2021
Apr 27, 2018
Mar 15, 2024
Apr 27, 2018
Apr 27, 2018
Apr 14, 2020
Mar 15, 2024
Jan 21, 2019
Feb 15, 2021
Mar 15, 2024
Apr 14, 2020
Mar 15, 2024

Repository files navigation

Extraction

Sentences to translate are extracted using our AST Parser that parses JS/JSX files and match the following structures.

import i18n from 'libs/i18n'
const text = i18n.t('My string to translate') || t('My string to translate when using the HOC translate()')
const interpolation = t('{{ number }} is my number', { number: 42 })
const plural = t('one object', { plural: '{{ count }} objects', count })
const context = t('string with context', { context: 'ctx' })
const comp = (
	<Translate>
		<span>
			This <b>will be</b> <i>extracted</i>
		</span>
	</Translate>
)