mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 21:39:07 +00:00
13 lines
312 B
TypeScript
13 lines
312 B
TypeScript
|
import { useTranslation } from 'react-i18next';
|
||
|
|
||
|
export const NAMESPACE = 'workflow-aggregate';
|
||
|
|
||
|
export function useLang(key: string, options = {}) {
|
||
|
const { t } = usePluginTranslation(options);
|
||
|
return t(key);
|
||
|
}
|
||
|
|
||
|
export function usePluginTranslation(options) {
|
||
|
return useTranslation(NAMESPACE, options);
|
||
|
}
|