Coder Social home page Coder Social logo

Comments (10)

IlCallo avatar IlCallo commented on August 23, 2024 2

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.

NetanelBasal avatar NetanelBasal commented on August 23, 2024 1

I updated the table. Let me know if there are any mistakes, and I will update. Thanks.

from transloco.

IlCallo avatar IlCallo commented on August 23, 2024 1
  • 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's Pipe + 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.

NetanelBasal avatar NetanelBasal commented on August 23, 2024 1

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.

IlCallo avatar IlCallo commented on August 23, 2024

Perfect, thank you!
There are some things wrong:

  • listenToLangChange: angular-l10n provide LocaleService to listen and react to locale changes
  • Multiple Languages Simultaneously: pretty much every goodies of angular-l10n accept an optional lang to use instead of the default one. I'm just not sure about directives 🤔
  • Hackable: while not hackable as transloco, 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 problem
  • Additional 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 into transloco

I think there's more, but this is what I know from personal usage and docs reading

from transloco.

NetanelBasal avatar NetanelBasal commented on August 23, 2024

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 something
  • Ivy 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.

NetanelBasal avatar NetanelBasal commented on August 23, 2024

@IlCallo you're welcome to submit a PR for any additional functionality you want.

from transloco.

IlCallo avatar IlCallo commented on August 23, 2024
  • listenToLangChange - Ok, I got it now, you meant the optimization due to unsubscribing.
  • Multiple Languages Simultaneously - Yes, all pipes have a lang 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.

NetanelBasal avatar NetanelBasal commented on August 23, 2024
  • 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.

NetanelBasal avatar NetanelBasal commented on August 23, 2024

Our solution is a structural directive.

from transloco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.