Vue-i18n is a popular internationalization (i18n) library for Vue.js that can be used in a Laravel project to handle localization. Here are the basic steps to set up localization with vue-i18n in a Laravel project: Install the vue-i18n package using npm or yarn: npm install vue-i18n@8 Yarn yarn add vue-i18n@8 When using with a module system, you must explicitly install the vue-i18n via Vue.use(): Add your this to your main app.js file import VueI18n from "vue-i18n"; Vue.use(VueI18n); const messages = { en: enMessages, bd: bdMessages, }; const i18n = new VueI18n({ locale: "en", // set locale messages, // set locale messages }); import { enMessages } from "./constants/en"; import { bdMessages } from "./constants/bd"; const app = new Vue({ i18n, // add this in you code }); create a folder in resources/js folder and name it "constants" and make a file in this constant folder en.js and bd.js write your keyword for english in en.js file export const enMessages = {

Write your keyword for Bangla or another language keyword in bd.js file export const bdMessages = {
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners