how i can add a custom translation and use useTranslation in client component
i followed the documentation but dont get a result
the default translation is work well in admin but the custom dont
payload.config.ts:
import { ar } from '@payloadcms/translations/languages/ar'
import { en } from '@payloadcms/translations/languages/en'
i18n: {
supportedLanguages: { ar, en },
fallbackLanguage: 'en',
translations: {
ar: {
custom: {
search: 'بحث',
},
},
en: {
custom: {
search: 'Search',
},
},
},
},
frontend Component:
'use client'
import type React from 'react'
import { useTranslation } from '@payloadcms/ui'
export const MyComponent: React.FC = () => {
const { t } = useTranslation()
return t('custom:search')
}
dose there any thinge wrong with this impementation ????