Internationalizing clinFHIR

I’m supposed to be finishing off my presentation (I’m giving the ‘FHIR for developers’ tutorial at the Montreal WGM) and Mary-Anne will kill me if it’s in late – but I was chatting with a colleague from HL7 Russia, and got a bit sidetracked…

Apparently they like some of my posts (which is flattering) and are translating them into Russian (also flattering). They also like using clinFHIR as an educational tool (even more flattering) but wondered if it could be ‘internationalized’ – ie the User Interface elements translated into Russian (the resource content would remain English of course). Now this is the second time that someone has asked for this (the last one was from Lithuania), so I thought why not?

It actually turned out to be quite straight-forward. Angular has support for Internationization (or at least there are plug-ins that will do that) so it’s just a matter of using ‘placeholders’ for the UI text which get rendered in the language of choice.

So here’s what the front page of the new Resource Builder looks like in English…

Screen Shot 2016-04-30 at 10.15.35 am

And in Russian…

Screen Shot 2016-04-30 at 10.15.18 am

You select the language by clicking the gear icon to the upper right and selecting the ‘Change Language’ option (actually the UI re-renders in real time as you change languages, which is kind of cool!). It will remember the language you chose (in the browser) – but can always be changed back if you are experimenting.

I’ve done partial translations for English, Russian and Dutch (to honour Furore and all the effort they’ve put into FHIR). I was going to do one for Australian (or Ocker), but for some reason Google didn’t offer that…

This is a work in progress, so:

  • The implementation is a bit crude – the translations are baked in so need to be pulled out to separate files for maintainability
  • Not all of the UI elements are currently translated
  • Because some of the translated words are longer than their English equivalents the UI does get mucked up a bit
  • I used Google for the translations – better than nothing, but can doubtless be improved (my Russian colleague was very polite…).

But it is a start!

I should have the code tidied up some time after the WGM, so leave a comment (or contact me directly) if you’d like to contribute a translations file and I’ll give a shout when ready.

Now, back to that presentation…

 

 

About David Hay
I'm a Product Strategist at Orion Health, Chair emeritus of HL7 New Zealand and co-Chair of the FHIR Management Group. I have a keen interest in health IT, especially health interoperability with HL7 and the new FHIR standard.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: