Translate The App(Multi Language Support)
In this section, you will get detailed documentation to learn about how you can translate your app in your preferred language.
Last updated
In this section, you will get detailed documentation to learn about how you can translate your app in your preferred language.
Last updated
Vuely support multilingual feature which helps you to build your app in your native language. Read the documentation below carefully and follow the given steps.
Vuely provide you the options to change the default locale of the template according to your language. You can choose from the given table of the languages, to set any language as your default locale. Languages is a type of array used in the template and we are showing it here in the form of table.
Go to the src->store->modules->settings
directory and open index.js
file. Search for the key selectedLocale
and update its value with languages[Number_Assigned_In_Above_Table]
. You can get the number assigned to any particular language from the table above.
For Example:
Here are the instructions to add a new locale in your app. We have taken an example of adding German language to the template.
Create a directory with name of locale code inside the src->lang
directory. For German Language Example: create a dictionary with ge
Create index.js
file under the directory that you have just created and define the static strings which you want to translate into German, you can check the other locale files to copy all the strings and then convert them to German language. Example below:
After defining all the strings. Open src->lang->index.js
file and import the file that you have just created. Example:
Now you need to add your locale inside the data.js
file under the src->store->modules->settings
directory.
Make sure you add the new locale at the last position in the array. Also the numbers that are assigned to each language for passing it into the selectedLocale is self incrementing. Take care of the number that is being passed to the selectedLocale accordingly.
That's it, Now you are done with adding a new locale to the template.
Language
Assigned Number
Default Language Codes
English
0
en
French
1
fr
Hebrew
2
he
Russian
3
ru
Arabic
4
ar
Chinese
5
cn
German
6
ge
Spanish
7
sp
Japanese
8
ja
Korean
9
ko
Italian
10
it
Hungarian
11
hu