Translations
Description
Translation of the administrative control panel
Create
If you are creating a new locale that you want to use in the Admin Dashboard, you will need to create a new file and provide your translation for the specific locale you are adding.
Example:
src/lib/AdminTranslation.ts
export default function AdminTranslations() {
const translations: any = {
de: {
delete: 'Löschen',
ok: 'Ok',
cancel: 'Stornieren',
rows_per_page: 'Zeilen pro Seite',
add: 'Hinzufügen',
general: 'Allgemein',
submit: 'Einreichen',
back: 'Zurück',
invalid_component: 'Ungültige Komponente',
please_wait: 'Bitte warten...',
update_successful: 'Update erfolgreich',
something_went_wrong: 'Da ist etwas schiefgelaufen',
view: 'Sicht',
edit: 'Bearbeiten',
actions: 'Aktionen',
upload: 'Hochladen',
confirm_delete: 'Löschen bestätigen?',
logout: 'Ausloggen'
}
...
};
return translations;
}
Implementation
Example:
import AdminTranslations from 'lib/AdminTranslation.ts';
export default function AdminDashboard() {
return (
<MarkusAdmin
translations={AdminTranslations()}
/>
)
}
:::tip
Each locale option must have data in the AdminTranslation.ts.
:::