mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 03:20:46 +02:00
React translations
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Re-export react-i18next hook with our custom types
|
||||
export { useTranslation } from 'react-i18next';
|
||||
|
||||
// You can add custom hooks here later if needed
|
||||
// For example, a hook that returns commonly used translations
|
||||
import { useTranslation as useI18nTranslation } from 'react-i18next';
|
||||
|
||||
export const useCommonTranslations = () => {
|
||||
const { t } = useI18nTranslation();
|
||||
|
||||
return {
|
||||
submit: t('genericSubmit'),
|
||||
selectPdf: t('pdfPrompt'),
|
||||
selectPdfs: t('multiPdfPrompt'),
|
||||
selectImages: t('imgPrompt'),
|
||||
loading: t('loading', 'Loading...'), // fallback if not found
|
||||
error: t('error._value', 'Error'),
|
||||
success: t('success', 'Success'),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user