π€Translation
you can add more translations to your app by using langs(){} method on the Resource class
Use in Resource
inside your ResourceFolder/Traits you will get a trait for transitions Transaltion.php you can add more translation to it
public function loadTranslations(): array
{
return [
"index" => __("{{ headerTranslationName }}"),
"create" => __('Create ' . "{{ fieldsTranslationName }}"),
"bulk" => __('Delete Selected ' . "{{ fieldsTranslationName }}"),
"edit_title" => __('Edit ' . "{{ fieldsTranslationName }}"),
"create_title" => __('Create New ' . "{{ fieldsTranslationName }}"),
"view_title" => __('View ' . "{{ fieldsTranslationName }}"),
"delete_title" => __('Delete ' . "{{ fieldsTranslationName }}"),
"bulk_title" => __('Run Bulk Action To ' . "{{ fieldsTranslationName }}"),
];
}Use in Provider
you can use the Lang::class direct on the provider by using VILT::class like
VILT::registerTranslation(Lang::make('users.sidebar')->label(__('User')));it will pass the users.sidebar to the vuejs inside this.$attrs.data.trans array
Last updated