Hacker News new | ask | show | jobs
by PascalPrecht 4507 days ago
You are right, dirty check is not the best thing when it comes to performance. However, we've updated the directive to only set up watches when needed. Which means, when you don't change the language at runtime, but kick off some $digest cycles, they don't get re-evaluated. So this should be an performance boost. Filters always set up watches, if you use filters, well... deal with it. You could use the directive. angular-translate isn't the answer for everyone and that's okay because this is not what it should be. It solved a problem for me and people like it, which is why I still develop this module.

For some cases angular-gettext surely makes more sense, angular-translate gives you just a much higher integration into the angular world and solves more problems like async loading, fallback languages, pluralization, language negotiation etc etc.

Chose what fits best for you! :)

1 comments

"Conditional watches" on the directive sounds good, I will try it. Also gettext support will be great, the use of existing i18n tools is a must have.