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
Discussion: future of the library #783
Comments
Hello, I've been using your library as long as I've been using Angular (4+). Last year, around this time I'd been using AngularJs for a while and since Angular 2 was finally released, I decided to give it a try. It seemed a lot more complicated than AngularJs, and i18n was almost impossible for me to use. At that time, I had other projects to work on so I stopped using Angular 2. Few months passed, I had a chance to join the Ng-Conf. At the conference, I found John Papa at a hall and asked him about i18n in Angular. He said there is a built-in solution. I checked it out and it was too complicated. Extracting files, dealing with xml .... Also, we'd been using a tool for i18n, and we've put all of our translations into a json file. So, built in i18n was not an ideal solution for me. You listed some of the issues with ngx-translate. I think the most important one is that if, somehow, a user cannot download translation file or there is an exception somewhere, you could end up with messed up screen. Other issues, for me, are not so important. Also, another feature of ngx-translate I really like, is code translation. I could use Long story short, I'd love to see you to keep maintaining this library even if you spend little time on it. I don't think angular built-in i18n solution should be the only one. I think having alternatives is always better. For license, I think companies would stop using it if you start charging new versions or they'll just use an old version which works just fine. It is because, purchasing a licence in a company is a painful process and I think most people would just avoid it and go for other solutions. Also, I have to mention that if a company buys a license, they expect 24/7 pro support. At least, mine does :) So, that would be hard to deal with. |
Hi @ocombe,
If my personal issues could be addressed by the official i18n solution, I could switch without any problem. |
We started using “ngx-translate” at the company because it delivers exactly what we need:
But if we would need to buy a license, I think we would stop using it. It would be hard to argue to pay for it, if Angular itself has something for free. And I can confirm that the process of purchasing a license in a big company is a painful process. I am not sure if you can make your project profitable with a paid license for commercial usage. Other models I know are, that there is a limited free version of a product and a commercial one with support, extended features and extended documentation. But because “ngx-translate” is easy to use and does exactly what it should, there is no need for us to pay for additional stuff ;-) :-/. |
+1 for option 1. In the end everyone wants to be on the official solution, esp. since v6 seems to fix the biggest limitations (and that they wanted to fix those in the first place, i.e. it's not going to pursue "wrong" direction forever. |
First of all, thx @ocombe for your library and amazing work. I use ngx-translate in every single frontend development project I do, one of the first dependency I inject ;) Furthermore to the simplicity of implementation, I use ngx-translate because supporting multi-languages is a must for all my projects. My major concern, because my main app is a Ionic/Cordova app, is having the abilility to have only one bundle and to boot the app in the right language. If that would be possible in the future with i18n, well I might be open to the idea to migrate to it . If that will not be possible, there is no way that I gonna migrate to i18n, I can't boot for example an app in english, then switch to french and restart the mobile app, that would be a crazy user behavior. About your question itself, I'm not a big company, just a single developper, so I could not tells you if they would be or not be open to a licence fee. But maybe a third option, just throwing that idea out of loud, to the two you listed above would be a donation model or even maybe better to start a kickstarter? Like "I need xx'xxx euros for the next x years in which I gonna implement these and these features and perform support and bug fixes etc.". |
Solution 1 is not "ditching it", just making sure it still runs on the current Angular and merging PRs that seem interesting or fix bugs. That's how it's been working for the past year. |
@DenisVuyka The projects is already hosted under ngx-translate github team. There wouldn't need to be "transfer of ownership", just assign PR merge rights to some trusted lieutenants. Truth be told, resources would still be better assigned as third party improvements to angular-i18n ecosystem (tools, hooks, what have you). That would provide some freedom of innovation outside Angular's strict quality policy while not diverging from the core offering |
What about proposing to angular team to make this an official alternative to angular i18n? Angular team may offer two different solutions for i18n. Would this not be better? |
This is not an option no. |
Then, I think option 1 is the one. People don't expect much out of this library, because, most of the apps just need something as simple as ngx-translate to support i18n. Angular solution may be powerful and better, but often it is overkill and may be harder to manage. |
attract more contributors and leveraging the community would be a good idea for making this lib live longer and keep it maintained, encouraging others to share ownership of the project can greatly reduce your own workload since you don't have enough time to review all PRs and issues. Maybe it'll take some times to do so but here's my suggestions:
About:
I read an interesting article a few weeks ago about Why Funding Open Source is Hard, |
If you think that it's the only thing that this library offers, sure. Not counting the time it takes to work on issues, edge cases and such. The time it took to research stuff, to create the library, bundle it, distribute it. The time it takes to write the tests, the plugins, to maintain the website, to write the documentation, the examples and to reply to people asking for help. If the license was for example 500$, how much time do you think that writing that library + its ecosystem of plugins would take you? Only a day? Maybe a week? How much are you paid for your job? If you work in the US, probably at least 500$/day. The bugs that made you "loose so much time" could have been resolved by me instead of your team. |
Love this project, @ocombe keep on maintaining. plz. |
I don't think he actually sees it that way, but I can see his point of view. Think of this way, consumers of this library are your customers, you are doing a great job and tremendous amount of work in order to deliver it but all they see is a service and a pipe. They don't really see what's going on under the hood. They never see the part of maintaining a library and keeping it stable. That's why people would think this way, and if you start charging for it, they'll just fork the library and make it a part of their project. Since, current version works for almost every app as is, they won't need to add new feature or fix some bugs. I think finding some collaborators and going with slow pace is the best option here. |
I can see lot of negativity and little respect for the work of @ocombe in this discussion. I really would like to see people saying today "I'm not gonna pay, I'll fork it", forking and maintaining their own version of the library, it's just a simple Pipe+Service, right? Please, do it, meanwhile I'm going to buy some popcorn to watch the show. 🍿 Probably the only thing people can do is just click on GitHub "Fork" button and stop then. |
Thanks. I'm not against taking some other maintainers, but from experience people start "playing" maintainer but give up really fast when they see the amount of work for no reward. |
I'd prefer it if Angular i18n would work better. I've been using both If you feel like you would get more out of working on this project and related offerings I might pay for a license, but it really depends on the cost. If I can spend a couple of hours to convert a project to use Angular i18n instead I might do that instead of paying some monthly license cost. It's difficult to compete with "free", sadly. It feels to me like Angular i18n is more geared towards larger more "enterprisey" businesses, while It really depends on your extra tooling and such in that case. Lastly, great job on both |
@Maistho this might be an interesting tool for your translators: https://www.codeandweb.com/babeledit |
@ocombe I love what you're doing with this project. A big plus is the run-time change of language. I use it in NativeScript projects so my users can switch the language easily. |
@ocombe ngx-translate is cool and efficient, it's pragmatic and I really like it. As a developer I think I'll use ngx-translate for my personal projects as long as it's maintained. Regarding professional projects I think that, the day Angular's solution with i18n is OK for my needs I'll switch. Hope this helps. Good luck and thanks for your great work ! |
Maybe you could start an OpenCollective or some way for people to donate individually to the project. Maybe something like a Kickstarter where each threshold unlocks a new feature to be implemented or issue to be resolved. I feel like ngx-translate is already 90% done, it just needs a few final touches. I'd like to use the official i18n solution, but it simply isn't flexible enough for me yet, and I'll keep using ngx-translate until it is. I don't see that being anytime soon, to be honest. I would donate personally. Having to go through a corporate process of purchasing and dealing with licensing though (dealing with procurement teams, legal teams, etc) - I would probably just stay on the current free version rather than deal with that to be honest. |
Bit late, but here's my feedback: We have a fairly large app at work which was written in AngularJS. When we started the migration to Angular 2, internationalization turned out to be a big challenge. We were using angular-translate with JSON files, runtime language switching, in-code translations, and ICU syntax. To make the long (and ongoing) migration to Angular feasible, we need all of this to work seamlessly across our hybrid app, so Angular's official solution was a long way off the mark. The only thing missing from ngx-translate, on the other hand, was the ICU syntax. Talking to Pascal Precht at a conference last year, he encouraged me to contribute to this library to add that feature, which I have done. ngx-translate was and continues to be crucial for the development of our app. Thanks again, @ocombe. About the future:
|
I am currently trying to help @ocombe with ngx-translate, getting the issues cleaned up, fixing smaller things. I don't want to see ngx-translate rot and die... Shot information about me: My name is Andreas Löw, owner of CodeAndWeb GmbH. We create tools for developers - main focus is game development (TexturePacker) but we've recently created a JSON editor called BabelEdit which works with ngx-translate. I'm a developer for quite a long time - started programming when I was 10... which means that I've 34 years of experience ;) My usual work is in C++, PHP for webpages and Javascript/Typescript. I've been working on an Angular project for the last year - but I must admit this does not make me an expert. As I said: I have good knowledge in coding - but not about Angular in depth. @ocombe Why don't you go to https://www.patreon.com ? It should be easy to setup and collect some money from donations. |
Well I have one question, is there a way on Angulari18n for angular 5 to load .json source files ? |
If anyone interested, I've started working on an alternative solution: https://www.npmjs.com/package/@ngstack/translate. Not trying to make a framework out of a library, and keeping things very simple and small. Should cover most of the real-life scenarios as well as addressing the most common issues my team has been struggling with when using ngx-translate/core during the last year. Live demos: |
Hi @ocombe . First of all, congratulations for you success story and the awesome work you've done till now. I think ngx-translate it's a great library and I'd like if you didn't stop to mantain it. My company is thinking to move on and migrate to i18n but we didn't take a decision yet both for the migration effort that will take and for the missing features on i18n like code translation. I would like to ask you if it's worth to change for a big and already started project. If so, is there a guide to facilitate the process? Have you already decided a future for your library, will it be deprecated if i18n will fill the gap with the missing features? |
Hi @ocombe, |
I'll keep it alive (updating for new versions of Angular) since it'll still be the only way to change the language without reloading the app, and also because a lot of people who are using it probably don't want to refactor their code to replace that lib as long as it works for them. |
@ocombe not all heroes wear capes, merci ❤️ |
Seems there is no real documentation for js-driven i18n in Angular 6 docs. What's the best place to look? |
Please just go on with this one. After a looong time i tried to use the official i18n again. And it still sucks the same as in the beginning. Yeah the builds are faster now and i can use it in typescript. But it is still way to painful to use. |
@mbeckenbach out of curiosity what is missing for you from the official i18n package? |
@ngehlert Besides the possibility to switch language at runtime, tooling is simply bad. There is nothing like xliffmerge built in. Because never people need to sync such files… Then when you bring it together with xliffmerge and universal you maintain the list of languages in how many places? Many |
@ngehlert Another think missing in official one is a possibility to have strongly typed keys. @@foo.bar is a magic string. With NGX translate and some effort i can have it strongly typed and refactoring safe. |
Sorry to be that guy - Seems like the status is of ngx-translate is still up in the air based on that thread, but it's been quite a while since there was a substantial commit to core. Is ngx-translate in hibernation in favor of locl? |
@TaylorAckley ngx translate is in maintenance mode because I don't have the time nor the incentive to work on it, and it's in a stable mode (a lot of people are still using it, the usage is even growing). |
Thanks, @ocombe! I appreciate everything you do! |
Hi @ocombe , is there any idea to provide a migration guide from your solution to angular i18n? As you have been working for both sides I'm sure you can recommend us how to proceed. Is there any thread talking about this process? I want to appreciate the effort you have done for still keeping this library updated but I understand that at some point you will stop doing the support if this library is not profitable at all. Thanks a lot! |
Hello there is an rumor that ngx translate is not maintened and need to migrate to transloco ? |
I published a new release a month ago, so this it just a rumor. |
Hi @ocombe! "but I make sure that the lib still works with new versions of Angular" -> Do you have plan, which will be the latest version? Thank you! |
@n84ck , as the maintainer stated on Dec 8, a new version is published that is compatible with ng 13. (latest version of the Library). Is that what you are asking? |
I also thank @ocombe for his work on ngx-translate. We had been using it since 2017, but never actually went to production with translations. We are now looking at converting to the standard XLF format using in-built Angular 13 support. I hope Angular will continue to work on this core feature. |
Hello @ocombe! Thank you very much for the work you have done. I would be definitely be willing to pay for the work you have done! There is a problem when we have an application and another one imports the first application's modules. We receive "NullInjectorError: R3InjectorError(GeneratedWasteModule)[TranslateService -> TranslateService -> TranslateService -> TranslateService]: Here is an issue: According to: This might not work? |
@dobrinsky can your app.module.ts in a gist (or here)? Maybe try getting it to work in a StackBlitz and see if you can trace the problem. |
@TaylorAckley, thank you very much for your reply. The first application's app.module.ts is:
This is the state with some of the changes I tried to implement for it to work. Initially, TranslateModule was simply imported, not declared with .forRoot(...) Can it be the case that SharedModule is this application is imported from the main application (that imports the modules of this application)? The main application that imports the modules from this application has the following app.module.ts:
The problem is that both applications start independently, but when I click on the routes of the first application, e.g. GeneratedWaste module's routes, only then I get the error with TranslateService. Thank you very much, |
Please don't talk about specific code issues in this topic, create a new issue for it |
I understand the message. The reason I wrote here was because of the issue: Which seems to point that there is something not working in versions 12 and 13 of Angular. I wrote here because I thought it might be something with the update. I will write in issue 1324. Sorry |
Welp. It's been 5 years... It's now Angular v15, they still can't support runtime translations... Sadge 😥 |
Recently, i thought its Here is the concept code i did from https://gist.github.com/leo6104/1d8da771f1cb3da237ca3ba06fe4fdea It almost 150+ lines removed and more readable logic with signal. I didn't fully understand PS) above gist code also includes other new feature.
|
Nice, I will have to look at this, I haven't dived deep into Signal either but that's a good idea |
@ocombe from my side, |
Any news on future of the library? Is it dead? 🤔 |
It depends what you mean by dead. It's in maintenance mode, just making sure it doesn't break with new versions of angular, but not adding anything else. |
Thanks, thats not so bad. But what about the open PRs? Will they be left open for all eternity? And do you have a backup person with access rights to this repo for the day when you can't/won't fix any breaking changes introduced through new Angular versions? |
I tried multiple times to find worthy maintainers, but people who wanted to just ended up not doing it. So yeah, probably the PRs will stay like this, unless I need this library personally again at some point in the future and decide to invest more time into it, but that's not on the menu for now |
Hi @ocombe, first of all thank you for the great work. Do you plan to add a license file for the ngx-translate core and the @ngx-translate/http-loader package? |
Hello everyone, I'd like to discuss about the future of this library and get your opinion on my plans.
(Long) history
You can skip that part if you don't care about how this library came to life
When I started this library 3 years ago, I wanted to learn Angular and I thought that working on an open source project would be the best way to do that. It had worked for me on AngularJS with my library ocLazyLoad that was a huge success (2600 stars) and whose core principles were finally integrated into the framework in v1.6.7.
At the time I was looking for a way to translate my Angular apps and found out that there was nothing in Angular to do that (i18n wasn't even existing in the framework). I asked my good friend Pascal Precht if he was interested in porting angular-translate from AngularJS to Angular but he wasn't and told me that I should do it.
My library quickly became popular for various reasons (no real alternative, I had a good reputation from my work on ocLazyLoad, my appearances in Angular Air and my talks at conferences). And I guess that the code was good enough and easy to start with.
It was also a time where the framework was still in beta, and there were no real guidelines for publishing libraries for Angular, it was so hard to do it that not a lot of people were trying and I didn't have any real competition on i18n for a long time.
Some time later, the library ecosystem started to settle and Angular was stable, they decided to drop the name Angular 2/4/... in favor of just "Angular". I decided to rename this library ngx-translate and to use npm scopes in order to deliver a modular experience. I rewrote the whole library and made it possible to replace some parts (loader, parser, compiler, ...).
It was still a side project for me, but I was using it at work because we had finally started using Angular in production and needed to translate the app in multiple locales.
The official i18n implementation was super complicated (and still is), it didn't support json, code translation, changing the locale without reloading the app, and you needed multiple app bundles (one per locale). My library was so popular that I wanted to work on it full time because I could see that it was a necessity for the Angular community. It solved a lot of use cases, and was simple enough to be usable in a few minutes.
I decided to quit my job and see if I could make a living out my open source work. I knew that it was possible because ag-grid had done it and they were very successful. It was in December 2016, I had 2 months left at work before I was free, and I went to the conference NG-BE where Igor Minar from the core team was present. I wanted to ask him some advices on how to turn this into a profitable OSS project, but before I could tell him about my plans, he told me: "Ah Olivier, I wanted to talk to you, you've got to stop working on your library [ngx-translate], Companies come to us and want to do i18n, but they only talk about your library, we want them to use our solution [Angular i18n] because it's more efficient".
I was a bit speechless, I was there about to tell him that I had quit my job and wanted to work full time on my lib, and he was asking me to stop working on it. So I did what anyone with a bit of common sense would have done, I told him that Angular i18n sucked, that it failed to deliver the promise of easy-to-use-yet-powerful that they wanted Angular to be.
I probably didn't use those words, but he agreed with me that it still needed some work, but they didn't have enough resources to work on it (Victor Savkin and Jeff Cross had just left the team to create Nrwl).
I jumped on the occasion and told him that I would love to work with them to improve Angular i18n.
He told me that he would consider it, and we left it at that.
A few weeks later, and recontacted me, and told me that they were ok to hire me as a contractor to work on i18n. It was like Christmas for me (actually it was around Christmas, so that might explain it) because working for Google is a once in a lifetime opportunity and a dream job. But working on open source, from home, for Angular, it was even better and I didn't even thought that it was possible for me to do that.
I joined the team in February 2017 (almost a year ago), and started working on i18n. There was a lot of work to do, but I was confident that I could make a difference. It was clear to me at the time that it would take a few months to make i18n easier to use for everyone, with the features that people wanted, and that I could deprecate my library after that.
It turns out that working on a framework like Angular is super complicated. The codebase is huge, not highly documented, with a lot of different packages. The development process is complicated (it doesn't even work on Windows yet), and whenever you make a change you have to be extra careful not to break anyone. We even write tests, like a lot of tests! It was a big shift for me, because I had always worked on projects that needed to ship fast, and tests were clearly not the priority, you fixed bugs instead. But working on a library like Angular is totally different. Millions of people depend on your code, when you make a mistake you can break applications that loose thousands or hundred of thousands of dollars because of you. The responsibility is overwhelming and that's why it is much more complicated to release new features. I also wasn't the one deciding the priorities for the framework. Any change that you want to make has to work with Google applications, and it's not like you can duplicate functionalities to make it work for everyone (who said forms and http?).
Anyway it was complicated to change the way i18n worked in Angular. I learned a lot and I feel like we're going in the right direction now. I understand the choices that they made for Angular i18n, it's the most efficient and stable way to translate applications. It works very well for huge companies like Google, but it just isn't what most developers need/want.
During this year, I haven't really worked on ngx-translate. The issues are pilling up, I've only merged a few PRs and some of them have been waiting there for a long time without any activity because of me. There are some long term issues that I haven't taken the time to fix (code splitting / lazy loading, testing, ICU expressions, bugs with ionic...).
But before we get to that, let's quickly compare my library with the native implementation.
Angular
In Angular, you translate your templates using an extraction tool that generates xmb or xliff files, which are well defined formats that have been battle-tested. Those files are translated using professional tools, by real translators. At the end you merge the translations at build time and get a translated bundle.
Advantages:
Issues:
ngx-translate
With ngx-translate you load the module and configure it, you then load the json files containing your translations. You need to manually define keys for your translations and to write them in your json files that you will probably translate yourself, or transform into other formats that you'll send to your translators. But it's ok because json is easy to manipulate and generate.
Advantages:
Issues:
Changes in Angular
Like I said, I've been working on Angular i18n for almost a year now. I've actually worked on a lot of other things as well, and the changes in i18n were clearly not the priority for the framework. A lot of internal changes were also necessary before we could do the changes that we wanted.
I've greatly improved the documentation (i18n guide), I've created demo projects with and without the cli to help people get started. I've worked on bugs, and made a few changes, but we've not released anything major for translations.
Finally for v6 the big changes are coming, translating will be done at runtime. Having access to the internals of the framework means that it will be way more efficient than what ngx-translate does. You shouldn't experience the FOC effect, and it won't take any resource during change detection. You'll be able to do code translations, at last! There will only be one bundle per application for all of the locales (or multiple, if you prefer). And libraries should be translatable.
What will not change:
So what about ngx-translate future?
This has been a long post, and we're finally getting to the part where we talk about the future of ngx-translate. The way I see it there are 2 solutions:
1/ we continue like it has been for the past year, only merging a few PRs, not working on new features and not improving the workflow. I keep working on making Angular i18n better and hopefully people will stop using this library because the native solution will be better. Or maybe a real alternative will emerge (like https://github.com/robisim74/angular-l10n).
2/ I change the way I work and decide to spend more time on the library (at least 1 day/week) to improve it: fixing lazy loading, code splitting, adding functions to help with testing, support ICU expressions, create well documented and maintained examples, finally tackle ionic and other mobile issues, ...
I focus on making sure that the library stays a viable alternative to Angular i18n by providing solutions to the "problems" that Angular i18n will not fix. I write better tooling, maybe even an editor for the translations. I rewrite the documentation, on a real website with shiny examples.
To do all of that, I would need to make this library profitable somehow. I was thinking about changing the license to require companies to pay for the library (while keeping it free for open source and personal projects) in exchange for priority support (for bugs fixing, and for working on the features that they want the most).
Obviously the current version would remain free and MIT-licensed, since there's no legal way to retroactively change a license, and it would be stupid to do that anyway. But new versions would be using this new license.
This library is downloaded ~350 000 times / month on npm now, if you compare that to the ~2 400 000 downloads of
@angular/core
, it means that my library is used in 1 out of 7 Angular projects! That's crazy, and it gives me confidence that this is viable.What do you guys think? Would your companies be willing to pay for a better ngx-translate? Do you see any other alternative?
The text was updated successfully, but these errors were encountered: