14 lines
295 B
TypeScript
14 lines
295 B
TypeScript
import localeRu from '../locales/ru.json';
|
|
|
|
module.exports = {
|
|
useTranslation: (_, options) => {
|
|
const { keyPrefix } = options ?? {};
|
|
return {
|
|
t: keyPrefix ? (key: string) => localeRu[`${keyPrefix}.${key}`] : undefined,
|
|
i18n: {
|
|
language: 'ru'
|
|
}
|
|
};
|
|
}
|
|
};
|