How to create .po file for vue?

I’ve been researching on how to translate my vue project but I’m getting kinda stuck.
I’ve been asked to create a .po file (that I can then use in poedit or something similar).

I’ve tried implementing vue-gettext but I’m a bit confused on how to work it. I’ve added easygettext as needed but I keep getting module errors:

./node_modules/easygettext/src/extract-cli.js
Module parse failed: Unexpected character '#' (1:0)

and it seems I need a translations.json file to use the vue-gettext plugin but it also looks like the translations.json is created by gettext-compile but when I run gettext-compile --output translations.json fr.po en.po de.po
I get gettext-compile: command not found

So I’m wondering if anybody knows how to setup vue-gettext properly or if there are any alternatives to create .po files?

Thanks so much!

Hey there,

why did you choose this library in the first place?
Is there some special requirement only this library can solve?

I’m asking this, because this library seems to be very small, user-wise.

Vue has a lot of other internationalization libraries:

The Github engagement seems to be very low:

vue-18n engagement looks like this:

1 Like

Hi, thanks so much for taking a look at my question!
I don’t specifically need this one, I just need something that can generate a .po file and this is what I came across.
When I was looking into vue-i18n it seemed like the translations were done internally but I would definitely consider using it if I can generate .po file from it.