Skip to main content

Multi Language

Backend#

Badaso provides english by default for languages in backend. To change the language, it is necessary to make a localization configuration for laravel, this configuration can be set via .env. Below is the directory structure for adding a new language.

๐Ÿ“ฆ Your Projectโ”ฃ ๐Ÿ“‚ resourcesโ”ƒ โ”ฃ ๐Ÿ“‚ langโ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ badasoโ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ enโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ api_response.phpโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ validation.phpโ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ add your langโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ api_response.phpโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ validation.php

Frontend#

For some labels on the frontend, also use a separate language from backend. The code below is the language directory structure in frontend. The language on the frontend can be changed via the header navbar on the dashboard. The language in frontend only changes labels on frontend, not including responses from backend Badaso.

๐Ÿ“ฆ Your Projectโ”ฃ ๐Ÿ“‚ resourcesโ”ƒ โ”ฃ ๐Ÿ“‚ jsโ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ badasoโ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ langโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ en.jsโ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ id.js