From 01e2236c64c491167233bf9fdf7829f7e07e7a12 Mon Sep 17 00:00:00 2001 From: Abdessamad Bettal | Freelancer <93977120+abdessamadbettal@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:34:52 +0000 Subject: [PATCH] Add multilingual support for blog section and update Vue i18n configuration --- config/vue-i18n-generator.php | 2 +- lang/ar/home.php | 3 +++ lang/en/home.php | 3 +++ lang/es/home.php | 3 +++ lang/fr/home.php | 3 +++ resources/js/Components/Blog/BlogSection.vue | 9 +++++++-- resources/js/i18n/locales.js | 20 ++++++++++++++++---- 7 files changed, 36 insertions(+), 7 deletions(-) diff --git a/config/vue-i18n-generator.php b/config/vue-i18n-generator.php index 7e1b16e..df8ed76 100644 --- a/config/vue-i18n-generator.php +++ b/config/vue-i18n-generator.php @@ -7,7 +7,7 @@ |-------------------------------------------------------------------------- | | The file path for the compiled Vue i18n file. - | + | Run this cmd for generate transalations --> php artisan vue:translations */ 'outputFile' => resource_path('js/i18n/locales.js'), diff --git a/lang/ar/home.php b/lang/ar/home.php index 30c94da..3242a51 100644 --- a/lang/ar/home.php +++ b/lang/ar/home.php @@ -8,4 +8,7 @@ 'features' => 'الميزات', 'blogs' => 'المدونات', 'documentation' => 'التوثيق', + 'see_more_posts' => 'عرض المزيد من المقالات', + 'latest_blogs' => 'أحدث المقالات', + 'latest_blogs_text' => 'اقرأ أحدث المقالات من مدونتنا.', ]; diff --git a/lang/en/home.php b/lang/en/home.php index 17c1b0b..72ac0e1 100644 --- a/lang/en/home.php +++ b/lang/en/home.php @@ -8,4 +8,7 @@ 'features' => 'Features', 'blogs' => 'Blogs', 'documentation' => 'Documentation', + 'see_more_posts' => 'See more posts', + 'latest_blogs' => 'Latest Blogs', + 'latest_blogs_text' => 'Read the latest posts from our blog.', ]; diff --git a/lang/es/home.php b/lang/es/home.php index 611cbbc..4689468 100644 --- a/lang/es/home.php +++ b/lang/es/home.php @@ -8,4 +8,7 @@ 'features' => 'Características', 'blogs' => 'Blogs', 'documentation' => 'Documentación', + 'see_more_posts' => 'Ver más publicaciones', + 'latest_blogs' => 'Últimos Blogs', + 'latest_blogs_text' => 'Lea las últimas publicaciones de nuestro blog.', ]; diff --git a/lang/fr/home.php b/lang/fr/home.php index 9e72b97..153d4b3 100644 --- a/lang/fr/home.php +++ b/lang/fr/home.php @@ -8,4 +8,7 @@ 'features' => 'Fonctionnalités', 'blogs' => 'Blogs', 'documentation' => 'Documentation', + 'see_more_posts' => 'Voir plus de publications', + 'latest_blogs' => 'Derniers Blogs', + 'latest_blogs_text' => 'Lisez les dernières publications de notre blog.', ]; diff --git a/resources/js/Components/Blog/BlogSection.vue b/resources/js/Components/Blog/BlogSection.vue index 9446258..1087d4f 100644 --- a/resources/js/Components/Blog/BlogSection.vue +++ b/resources/js/Components/Blog/BlogSection.vue @@ -1,10 +1,10 @@ - {{ $t('travel_blogs') + {{ $t('latest_blogs') }} - {{ $t('simple_text') }} + {{ $t('latest_blogs_text') }} @@ -20,11 +20,16 @@ + + {{ $t('see_more_posts') }} + +
{{ $t('simple_text') }}
{{ $t('latest_blogs_text') }}