# Scripts
# Adding scripts
If you have not configured your package.json
with the required scripts, please see add scripts to package.json section first.
# Extracting messages
This command will go through your project and collect translation values, save as .po
files inside locale
folder.
Simply run the command below to extract messages from your source code.
npm run gettext:extract
# Translate Messages
Before translation your extracted values, you need to have google.json
file to exist in your project root. Add the google.json
from vue-project-template (opens new window) to the root of your project.
Then you can simply run the command below to translate the messages to the configured languages.
npm run gettext:translate
# Generate Messages
If you need only to generate the .po
files without translating them, then you can simply run the command below.
npm run gettext:generate
# Compile Messages
This command will simply convert your .po
files to .json
and put in public/translations
folder.
To compile messages simply run:
npm run gettext:compile
← Translations API →