📊
Fuodz(webApp)
  • Introduction
  • Vue Web App
    • Getting Started
    • Directory Structure
    • Connect To Backend
    • App Color / Theme
    • Changing Icon & App name on Browser header
    • Shared Hosting
    • Enable Google Maps Javascript Api
  • How to Add languages
  • Enable firebase OTP
Powered by GitBook
On this page

Was this helpful?

How to Add languages

How to add languages and make a default language

  1. In the root directory, there is a folder called locales, which is where all the languages are stored

  2. In the locales folder, if your prefered language isn't available, you can add that by creating a file and giving it the shortcode of the language, for example, English will be en, Spanish will be es and French will be fr, you can google it if you're not sure of what yours is.

  3. After creating the file, copy content from either of the existing languages and change the texts on the right side to the language you want to add.

  4. to set a default language, within the root directory, in the folder called src, there is a file called i18n.js, within it, scroll to an export function called createI18n, within that function, you will see on the first line a word locales, and beside it in comment, 'en', change it to the language shortcode you want to be the default language, so if you want to make french default, you put fr there or Spanish you put es there and you are done, save and run your code.

PreviousEnable Google Maps Javascript ApiNextEnable firebase OTP

Last updated 3 years ago

Was this helpful?