Patterns of Enterprise Software Development - Babelfish, localising your apps
To efficiently work as an Enterprise Software Developer you need a toolbox of pre-fabricated Micro Services solving specific problems.
Join the DZone community and get the full member experience.Join For Free
Yesterday my manager spent half the day cleaning up our translation database. His primary tool of choice was SQL insert, update, and delete statements, combined with Microsoft SQL Server Manager Studio. But before you laugh, realise that this is a job I've done myself dozens of times, due to the lack of Micro Service components, solving these types of problems out of the box. Of course the idea is to end up with only the English entities in our database, export them as a CSV file, send them to our employees responsible for translating our items into Japanese, Portuguese, and God knows what - For then to import the result back into our database. Yes, I know! Sigh!
Typically this process is highly manual, involves dozens of people, requiring weeks of work hours for our employer in process. If you don't recognise this problem, you're either working for an employer not needing things to be translated - Or you are not an experienced enterprise software developer. The problem with the problem, is that it's a no-problem really, and should have been permanently solved a long time ago, freeing up resource for all those involved.
The solution of course it to create Micro Service components, with a GUI, allowing us to optimise the process of translating entities by 2 order of magnitudes. Hence, a simple administrative tool such as the one shown below, would easily free up hundreds of man hours every year for my employer.
Creating these types of "micro service apps" of course is ridiculously easy using Magic, since once the scaffolder process is done, 99% of the code is done. It's just CRUD basically, injecting Google Translate into the "Create" endpoint, resulting in that my employer saves probably 100 man hours of work every single year after having started using it. It also comes with the additional benefit of becoming a single resource for translations of all of our apps, that requires translations for some reasons.
2 hours of work for me, 100 hours saved for my employer every year
Phrased like the above it doesn't take a rocket scientist to understand the benefits I presume. And when some developer needs a new translated entity, all he's got to do, is to logon to the "Babelfish enterprise frontend" and add the English entity - Giving him according to Google's research in this area a 98% statistical probability of that it's automatically translated correctly into every single language your apps needs to support for some reasons. And before the new version is deployed into production, just make sure the translators in your company goes through the added entities to sanity check the result before deploying things into production - And Simsalabim, Abra Ka Dabra, and 100 hours of work has been reduced to 2 hours of work. Watch me demonstrate the application in the video below.
If you're interested in using the above app in your own enterprise, you can find the repositories below.
The app is open source, and you can play around with it as you see fit - But you will need a license of Magic to use it. If you play around with it and you find it useful, there's a link to obtain a license in the app itself. And the app of course needs Magic to work. You can see my setup and the installation process in the above video, and you can see how to install Magic at its main website. The app comes with Docker files, allowing you to deploy it in a couple of minutes if you're experienced with Docker.
I'll probably expand upon the app a little bit before creating a release, making it simpler to use - But it should already easily save your employer for hundreds of man hours every year - Assuming your employer needs translations of course. Since the app is based upon an HTTP REST web API, it is technology agnostic, allowing you to consume it in everything ranging from PHP and RubyOnRails in one end, to ObjectiveC and .Net at the other end of the scale. So even though the app itself is built upon Angular and .Net 5, it is still 100% perfectly technology agnostic.
Of course the idea with the app, is that it gives you one HTTP REST endpoint returning every language your app supports, typically mapping into some sort of "Choose language by flags" widget - And another endpoint returning all translated entities for the specific language the user selects. The latter of course, returning a key/translation dictionary of items, allowing you to substitute translation entities in whatever frontend or backend you need translations injected into.
Later I might create a default Angular service class and pipe injecting into the GIT repository, allowing you to almost "drag and drop" translations into your Angular apps, but that's an exercise for later. Now I'll spend the rest of the Saturday enjoying some of those 98 hours of annual work my 2 hours of work before breakfast yesterday solved :)
Opinions expressed by DZone contributors are their own.