Comments (10)
I think I couldn't explain myself good enough: mine where just suggestions plus some context, not attacks to the library or saying which one is best (in my opinion, transloco
is the best right now).
Anyway, the table is now correct, original issue is solved: keep on the great work! :)
from transloco.
I updated the table. Let me know if there are any mistakes, and I will update. Thanks.
from transloco.
listenToLangChange
- Ok, I got it now, you meant the optimization due to unsubscribing. I understood it while you were writing and edited previous comment at the same time you add the new comment.Multiple Languages Simultaneously
- I was pretty sure I used it somewhere (I don't have access to that codebase anymore) but I guess I was wrong, sorry 😓Ivy support
- I think you updated the wrong bullet in the README (Pipe
works with AOT, it'sPipe
+AOT
+Ivy
which doesn't)
We don't need to support it. It's work out of the box in Transloco without this boilerplate code.
Not wanna pick a fight here, and you are right about the "works out of the box" thing, but the boilerplate in angular-l10n
is needed to keep the pipe pure, while you decided to go by the inpure pipe road.
Not saying it's wrong but it degrades performance, so you probably should add a disclaimer on the documentation.
angular-l10n
used impure pipes too, then decided to move to pure pipes and add the boilerplate, to avoid performance issues.
But maybe you found a way to avoid impure pipe performance degradation or you already studied the problem and noticed the performance impact isn't so high even with a lot of pipes used around, in that case sorry to bother :)
from transloco.
I will stop this discussion here. It becomes to be a discussion of who's better, and I don't like it. It's your decision whether to use angular-l10n
or any other solution. We appreciate every library and think that's good.
If there are more mistakes in the table, I will update. Thanks.
from transloco.
Perfect, thank you!
There are some things wrong:
listenToLangChange
:angular-l10n
provideLocaleService
to listen and react to locale changesMultiple Languages Simultaneously
: pretty much every goodies ofangular-l10n
accept an optionallang
to use instead of the default one. I'm just not sure about directives 🤔Hackable
: while not hackable astransloco
,angular-l10n
allow to hack some pieces of its configuration as needed (missing value management, storage strategy, custom translation provider, etc)Ivy support
: actually it supports Ivy, it doesn't support it only when using in combination with AOT (does Transloco work with AOT? It's not specified anywhere), but that's an Angular core problemAdditional Functionality
:angular-l10n
have a ton of additional features, for example SEO optimization, translations lazy loading, locale detection via Accept-Language header, value validation locale-based, etc etc. You can probably put some of those intotransloco
I think there's more, but this is what I know from personal usage and docs reading
from transloco.
Hi, couple of notes:
listenToLangChange
- Read in the docs what it means, please.Multiple Languages Simultaneously
- and you can use it in the template?Hackable
- not the same, but I will think of somethingIvy support
- "it doesn't support it only when using in combination with AOT", so it doesn't support Ivy. Everyone uses AOT. Yes, we support Ivy with AOT. They don't because of the Lang decorator is incompatible.Additional Functionality
- I will remove it from the table as it's too general.
from transloco.
@IlCallo you're welcome to submit a PR for any additional functionality you want.
from transloco.
listenToLangChange
- Ok, I got it now, you meant the optimization due to unsubscribing.Multiple Languages Simultaneously
- Yes, all pipes have alang
parameter. Cannot remember if it works with the directive too or not, on docs is not specified.Hackable
- the "partially" you added is fine I think :)Ivy support
- well, it doesn't support it when using decorators, so it actually supports Ivy except that use case. You don't support getting current language via decorator, so saying that Ivy isn't supported on that project because it isn't supported when using a feature you don't have doesn't seem really fair to me. Also, in a year and half of usage of that package I never had to use decorators: pipes, directives and services are just much more used. So maybe it can be a check mark with a side note?
from transloco.
- You should reread it. Anyway, this bullet is confusing. I removed it.
- Tell me what I'm missing because it doesn't seem to work:
<h3>{{ 'changeCountry' | translate: 'en' }}</h3>
<h3>{{ 'changeCountry' | translate: 'it' }}</h3>
- Added partially support.
- It's all over the docs, so I guessed this is the main use-case. I will update the table.
You don't support getting current language via a decorator
We don't need to support it. It's work out of the box in Transloco without this boilerplate code.
from transloco.
Our solution is a structural directive.
from transloco.
Related Issues (20)
- Feature(scope): Dynamically load and apply translations in app.routes HOT 1
- More explanation on how scope/alias should be used
- Feature(testing): Testing feature libraries in a nx monorepo HOT 1
- Bug(scope): Can not acccess view child of element wrapped inside transloco directive HOT 2
- Bug(transloco): cant provide DefaultHandler HOT 4
- Bug(transloco): transloco pipe does not support loadingTpl when template is provided HOT 1
- Bug(transloco): Loader with scope not working for NotFound route expression ** HOT 1
- Bug(preload-langs): NullInjectorError: No provider for TranslocoPreloadLangsService | Angular 16 HOT 3
- ng-add Path "undefined" does not exist HOT 14
- Docs for unit tests, broken links HOT 3
- Chore: 🤖 upgrade to angular v17 HOT 10
- Feature(transloco): allow option to disable loading language files at root i18n level HOT 2
- Bug(tranloco): provideTranslocoTranspiler does not work with FunctionalTranspiler HOT 1
- Bug(transloco): Multiple languages on the application simultaneously with pipe HOT 4
- Bug(transloco-optimize): Translation broken in production HOT 4
- Feature(transloco): use fallback language for resolving referenced keys
- Bug(scope): inflight 1.0.6 dependency has security issue.
- Bug(scope): Unit tests failing with standalone components HOT 3
- Bug(scope): scoped extractions prefixed not working HOT 3
- Bug(scope): Error when trying to load MFE within host using module federation (unless giving the same setup in host) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transloco.