Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON export format #44

Open
ricardosaracino opened this issue Aug 26, 2022 · 7 comments
Open

JSON export format #44

ricardosaracino opened this issue Aug 26, 2022 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ricardosaracino
Copy link

I noticed the native angular now supports exporting in JSON, and it would be nice if this did to. Great work on this this project thanks a ton.

@daniel-sc
Copy link
Owner

@ricardosaracino thanks for reaching out!

From what I read in angular/angular#45465 the json format is not really final/stable.

Furthermore the current format (without translation state and without source text) is barely usable in reality (I suspect). And with the current implementation the merge is not as simple..

Based on this, I'd rather postpone this. Of course if you (or others) would like to contribute, I'd be happy to include this!

@daniel-sc daniel-sc added enhancement New feature or request help wanted Extra attention is needed labels Aug 26, 2022
@chirag-shastri
Copy link

Hi, its over 1 year now since started talking on this.
Does angular i18n json translation format support now single string value and an object with the value?

@daniel-sc
Copy link
Owner

@chirag-shastri as you probably have noticed, this depends on the angular i18n-extract support for json format, which is tracked in the upstream issue linked above. As long as this is not addressed, there is not much this lib can do.

@co-dax
Copy link

co-dax commented Dec 18, 2023

@daniel-sc Angular is now allowing extraction to .arb format which is essentially a json and it seems it has all the same infor as .xlf format. Documentation is here https://angular.io/guide/i18n-common-translation-files#change-the-source-language-file-format and from there there is reference to .arb schema/format https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification.

Am I missing something?

@spock123
Copy link

We've been using i18n with json for a long time now, so it's definitely stable and supported. Would be super nice if support for this. could be added here

@jonnomk
Copy link

jonnomk commented Sep 7, 2024

Is it likely JSON support will be added? If not, is there an alternative package that can support extract and merge with JSON?

We need JSON for runtime language switching, which works well, but right now we're having to update the language files manually after using Angular's out of box extract-i18n.

Hats off and thanks for the solution as is - but JSON support would be great.

@daniel-sc
Copy link
Owner

@jonnomk json support could be added. As I probably won't have time for this soon, it'd be cool if someone could contribute this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants