I have old legacy site translated of 4 different languages with Gettext and .po files.
Now I am starting rebuilding of the site, and trying to use those files in new Angular2 site.
Is there any way I could directly use .po files?
I have tried https://github.com/ocombe/ng2-translate
with https://www.npmjs.com/package/@biesbjerg/ng2-translate-po-loader
but It's not working properly when passing params to string.
Then I tried some converters, to convert .po to JSON, but they are adding some nulls and arrays...
For example converting:
msgid "meta:Reporting"
msgstr "Reporting"
I get:
"meta:Reporting": [
null,
"Reporting"
]
Instead of
"meta:Reporting" : "Reporting"
Is there way to use directly .po files in Angular2?
I use ngx-translate
together with ngx-translate-po-http-loader
. I use them together with ngx-translate-extract
to extract text from my .ts
-fies to one or more .pot
-files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With