# I18n assets management / translation UI

**URL:** <https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534>\
**Category:** Rails\
**Created:** [September 6, 2010, 8:02pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534 "2010-09-06T20:02:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 6, 2010, 8:02pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/1 "2010-09-06T20:02:42Z")

</div>

Hello everyone,

i’m building a multi-lingual webapp with i18n from the ground up, and  
while i myself can deal with an army of yml files, the languages i  
speak are ( very ) limited, and would eventually like to ask for  
outside help.

I’d like to know if anyone here is using a UI plugin/gem ( not unlike  
django-rosetta on django ) to deal with multiple translators, some of  
them unwilling or unable to mess with 100+ files in a repository,  
working on language data.

thanks &regards,  
Andras

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 6, 2010, 8:55pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/2 "2010-09-06T20:55:24Z")

</div>

On 06 Sep 2010, at 14:09, andras wrote:

> i’m building a multi-lingual webapp with i18n from the ground up, and  
> while i myself can deal with an army of yml files, the languages i  
> speak are ( very ) limited, and would eventually like to ask for  
> outside help.
> 
> I’d like to know if anyone here is using a UI plugin/gem ( not unlike  
> django-rosetta on django ) to deal with multiple translators, some of  
> them unwilling or unable to mess with 100+ files in a repository,  
> working on language data.

This seems to fit the bill: [http://github.com/newsdesk/translate](http://github.com/newsdesk/translate)

I haven’t used it yet though. Maybe someone else can share their  
experiences or you can just try it out (doesn’t look like that much  
work to implement and just use a separate git branch to experiment on).

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 7, 2010, 1:22am UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/3 "2010-09-07T01:22:24Z")

</div>

On Tue, Sep 7, 2010 at 6:54 AM, Peter De Berdt  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’d like to know if anyone here is using a UI plugin/gem ( not unlike  
> django-rosetta on django ) to deal with multiple translators, some of  
> them unwilling or unable to mess with 100+ files in a repository,  
> working on language data.
> 
> This seems to fit the bill: [http://github.com/newsdesk/translate](http://github.com/newsdesk/translate)  
> I haven’t used it yet though. Maybe someone else can share their experiences  
> or you can just try it out (doesn’t look like that much work to implement  
> and just use a separate git branch to experiment on).

We’re using a slightly modified version of it on the Kete application  
([GitHub - kete/kete: Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.](http://github.com/kete/kete/) and our version of the plugin at  
[GitHub - kete/translate: A Ruby on Rails plugin with a web interface for translating I18n texts](http://github.com/kete/translate)). It’s good for a whole site’s UI  
translation. We have some guides that we point our translators at  
here:

[http://kete.net.nz/documentation/topics/show/289-using-translate-plugin-to-translate-your-kete-installation](http://kete.net.nz/documentation/topics/show/289-using-translate-plugin-to-translate-your-kete-installation)

[http://kete.net.nz/documentation/topics/show/276-general-strategies-for-creating-a-localization-of-the-kete-ui-for-13](http://kete.net.nz/documentation/topics/show/276-general-strategies-for-creating-a-localization-of-the-kete-ui-for-13)

Note that we have added some other things so that one translation (say  
a common noun or verb in the UI) can be reused in other translations  
to make the process quicker for the “base” UI elements.

You may also want to consider adding support for Right-to-Left  
languages (Arabic, Hebrew) in your CSS. See this branch for some  
commits that allow for that:

> **[GitHub - kete/kete at enhancement\_285\_add\_non\_left\_to\_right\_layout\_support](https://github.com/kete/kete/tree/enhancement_285_add_non_left_to_right_layout_support)**
>
> enhancement\_285\_add\_non\_left\_to\_right\_layout\_support

Now, a thing to keep in mind is that this is only for the default  
“static” user interface text defined in your templates. It won’t work  
with translating content (i.e. stuff that gets pulled from you  
database). Globalize2 is the longest running plugin for that sort of  
work.

However with Kete, we found that the working assumptions weren’t  
compatible with how we handling versioning of content so we decided to  
go our own way. We’re working on a new gem called mongo\_translatable  
([GitHub - kete/mongo\_translatable: Rails specific I18n model localization, ala Globalize2, backed by MongoDB rather than an RDBMS. May include UI elements, too.](http://github.com/kete/mongo_translatable)) that uses MongoDB as a  
backend for translation lookup. It’s an engine and includes a  
built-in UI for translation that is centered around the piece of  
content being translated. It’s basically done, but I need to bundle  
it up for release. Feel free to fork and contribute back to it.

If you are writing an app that is going with MongoDB generally, you  
should check out the all MongoDB plugin for translation here:

> **[GitHub - ahe/mongo\_translation: This Rails plugin for MongoMapper allows you...](https://github.com/ahe/mongo_translation)**
>
> This Rails plugin for MongoMapper allows you to easily translate your documents in multiple languages. - GitHub - ahe/mongo\_translation: This Rails plugin for MongoMapper allows you to easily trans...

Cheers,  
Walter

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 7, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/4 "2010-09-07T16:43:32Z")

</div>

andras wrote:

> Hello everyone,
> 
> i’m building a multi-lingual webapp with i18n from the ground up, and  
> while i myself can deal with an army of yml files, the languages i  
> speak are ( very ) limited, and would eventually like to ask for  
> outside help.
> 
> I’d like to know if anyone here is using a UI plugin/gem ( not unlike  
> django-rosetta on django ) to deal with multiple translators, some of  
> them unwilling or unable to mess with 100+ files in a repository,  
> working on language data.

I recommend not using an army of YAML files. Instead, install  
fast\_gettext, which adopts the GNU gettext approach of using PO files.  
The advantages here are:

- Readable string keys instead of weird symbolic ones
- Since PO files have been widely used in software localization for some  
time, there’s lots of translation tool support for PO files, and many  
translators already know how to work with them.

If you’re looking for a Facebook-style community translation interface,  
that Translate plugin certainly looks promising (though I’ve never used  
it either).

> thanks &regards,  
> Andras

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 8, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/5 "2010-09-08T14:44:40Z")

</div>

Walter McGinnis wrote:

> On Wed, Sep 8, 2010 at 2:43 AM, Marnen Laibow-Koser  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I recommend not using an army of YAML files. ï¿½Instead, install  
> > fast\_gettext, which adopts the GNU gettext approach of using PO files.  
> > The advantages here are:
> > 
> > - Readable string keys instead of weird symbolic ones
> > - Since PO files have been widely used in software localization for some  
> > time, there’s lots of translation tool support for PO files, and many  
> > translators already know how to work with them.
> 
> It’s pretty easy to take YAML and transcode them to other types of  
> files (and vice versa) with rake tasks.

I suppose it is, but why bother?

> We haven’t done it for PO  
> files, but we have for CSV and XML files to be imported to Excel for  
> translators and then take their Excel XML schema output and pull it  
> back to YAML files.

That seems like a lot of work…

> The advantage of the YAML stuff is interpolation for reuse of  
> translation. I.e. each translated string becomes a potential building  
> block for other string translations, e.g.
> 
> base:  
> foo: foo  
> bar: bar  
> new: new  
> new\_foo: “{{t.base.new}} {{t.base.foo}}”  
> new\_bar: “{{t.base.new}} {{t.base.bar}}”
> 
> Then when I create a new locale’s translation I can either replace the  
> base value for “new” in one place or (if grammatically necessary) edit  
> “new\_foo” and “new\_bar”. It’s a potential big time saver for larger  
> systems and it helps ensure UI consistency of nouns and verbs.

I think that if you are finding this to be a major advantage, then you  
may not be structuring your translatable strings properly. Also, due to  
differing grammar, reuse that’s possible in one language may not be  
possible in another – and it’s the translator’s job to know that, not  
yours. How do you deal with this?

> If you don’t expect to do this sort of sophisticated reuse of  
> translations, then Marmen may be right.

(Please note correct spelling of my name.)

> It’s simplest to go with the  
> translation industry’s standard PO files.
> 
> > If you’re looking for a Facebook-style community translation interface,  
> > that Translate plugin certainly looks promising (though I’ve never used  
> > it either).
> 
> The Translate plugin ISN’T really suitable for a Facebook-style  
> community translation interface, at least without significant work.  
> It is geared towards privileged users adding whole site translations.
> 
> You might be able to fork and hack it to be more community oriented,  
> but it wouldn’t be trivial work.

OK. Sorry for the misunderstanding.

> Cheers,  
> Walter

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 8, 2010, 1:04am UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/6 "2010-09-08T01:04:48Z")

</div>

On Wed, Sep 8, 2010 at 2:43 AM, Marnen Laibow-Koser  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I recommend not using an army of YAML files. Instead, install  
> fast\_gettext, which adopts the GNU gettext approach of using PO files.  
> The advantages here are:
> 
> - Readable string keys instead of weird symbolic ones
> - Since PO files have been widely used in software localization for some  
> time, there’s lots of translation tool support for PO files, and many  
> translators already know how to work with them.

It’s pretty easy to take YAML and transcode them to other types of  
files (and vice versa) with rake tasks. We haven’t done it for PO  
files, but we have for CSV and XML files to be imported to Excel for  
translators and then take their Excel XML schema output and pull it  
back to YAML files.

The advantage of the YAML stuff is interpolation for reuse of  
translation. I.e. each translated string becomes a potential building  
block for other string translations, e.g.

base:  
foo: foo  
bar: bar  
new: new  
new\_foo: “{{t.base.new}} {{t.base.foo}}”  
new\_bar: “{{t.base.new}} {{t.base.bar}}”

Then when I create a new locale’s translation I can either replace the  
base value for “new” in one place or (if grammatically necessary) edit  
“new\_foo” and “new\_bar”. It’s a potential big time saver for larger  
systems and it helps ensure UI consistency of nouns and verbs.

If you don’t expect to do this sort of sophisticated reuse of  
translations, then Marmen may be right. It’s simplest to go with the  
translation industry’s standard PO files.

> If you’re looking for a Facebook-style community translation interface,  
> that Translate plugin certainly looks promising (though I’ve never used  
> it either).

The Translate plugin ISN’T really suitable for a Facebook-style  
community translation interface, at least without significant work.  
It is geared towards privileged users adding whole site translations.

You might be able to fork and hack it to be more community oriented,  
but it wouldn’t be trivial work.

Cheers,  
Walter

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 8, 2010, 10:58pm UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/7 "2010-09-08T22:58:34Z")

</div>

Hi Marnen,

On Thu, Sep 9, 2010 at 12:44 AM, Marnen Laibow-Koser  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > translators already know how to work with them.
> 
> That seems like a lot of work…

It really depends on the set up of you translation community. Are  
they going to be using the web interface rather than industry tools?  
Then the primary storage is not really that much of concern.

> > Â new\_bar: “{{t.base.new}} {{t.base.bar}}”
> > 
> > Then when I create a new locale’s translation I can either replace the  
> > base value for “new” in one place or (if grammatically necessary) edit  
> > “new\_foo” and “new\_bar”. Â It’s a potential big time saver for larger  
> > systems and it helps ensure UI consistency of nouns and verbs.
> 
> I think that if you are finding this to be a major advantage, then you  
> may not be structuring your translatable strings properly.

That’s a pretty big statement, so it’s impossible to answer. You are  
welcome to review and comment on the master branch at  
[http://github.com/kete/kete](http://github.com/kete/kete).

> Â Also, due to  
> differing grammar, reuse that’s possible in one language may not be  
> possible in another – and it’s the translator’s job to know that, not  
> yours. Â How do you deal with this?

In my example new\_foo, if another locale grammatically (or in subtle  
meaning difference) can’t reuse the “building block” nouns and verbs,  
then new\_foo can have a totally independent value that doesn’t use the  
substitution.

It’s a bit of convention over configuration. It can be overridden  
when necessary, but for those where it “just works” then they get the  
benefit of it.

In other words, we don’t assume it will be right for all locales, but  
we do provide it for those that can take advantage of it.

> > If you don’t expect to do this sort of sophisticated reuse of  
> > translations, then Marmen may be right.
> 
> (Please note correct spelling of my name.)

Sorry about that.

Cheers,  
Walter

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 9, 2010, 6:38am UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/8 "2010-09-09T06:38:48Z")

</div>

Walter McGinnis wrote:

> Hi Marnen,
> 
> On Thu, Sep 9, 2010 at 12:44 AM, Marnen Laibow-Koser  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > > translators already know how to work with them.
> > 
> > That seems like a lot of work…
> 
> It really depends on the set up of you translation community.

Certainly.

> Are  
> they going to be using the web interface rather than industry tools?  
> Then the primary storage is not really that much of concern.

A Web interface such as most people would design is only going to be  
good at people submitting an occasional translation or two. If a  
professional or serious volunteer translator is going to translate the  
whole UI – particularly if CAT tools are involved – then PO is  
_probably_ the way to go.

> > > Â new\_bar: “{{t.base.new}} {{t.base.bar}}”
> > > 
> > > Then when I create a new locale’s translation I can either replace the  
> > > base value for “new” in one place or (if grammatically necessary) edit  
> > > “new\_foo” and “new\_bar”. Â It’s a potential big time saver for larger  
> > > systems and it helps ensure UI consistency of nouns and verbs.
> > 
> > I think that if you are finding this to be a major advantage, then you  
> > may not be structuring your translatable strings properly.
> 
> That’s a pretty big statement, so it’s impossible to answer. You are  
> welcome to review and comment on the master branch at  
> [http://github.com/kete/kete](http://github.com/kete/kete).

I’ll take a look when I have a chance (whenever that is – I’m quite  
busy at the moment). I also like the fact that the string keys in PO  
files make the views easy to read, and provide a sensible default when  
there is no translation yet.

> > Â Also, due to  
> > differing grammar, reuse that’s possible in one language may not be  
> > possible in another – and it’s the translator’s job to know that, not  
> > yours. Â How do you deal with this?
> 
> In my example new\_foo, if another locale grammatically (or in subtle  
> meaning difference) can’t reuse the “building block” nouns and verbs,  
> then new\_foo can have a totally independent value that doesn’t use the  
> substitution.

I am not sure that a professional or semiprofessional translator would  
find this feature of any use whatsoever. If I’m reading over my  
translation for a sanity check before sending it off to the client, I’d  
rather read

base:  
foo: Ñ„Ñƒ  
bar: Ð±Ð°Ñ€  
new: Ð½Ð¾Ð²Ñ‹Ð¹  
new\_foo: Ð½Ð¾Ð²Ñ‹Ð¹ Ñ„Ñƒ

which is repetitive but fluently readable, than

new\_foo: “{{t.base.new}} {{t.base.foo}}”

which is DRY but incomprehensible.

> It’s a bit of convention over configuration. It can be overridden  
> when necessary, but for those where it “just works” then they get the  
> benefit of it.
> 
> In other words, we don’t assume it will be right for all locales, but  
> we do provide it for those that can take advantage of it.

I think this is trying to DRY up your translatable text too much. I  
have generally seen this practice advised against. You’re making too  
many linguistic assumptions about the way the text breaks down, for one  
thing.

> > > If you don’t expect to do this sort of sophisticated reuse of  
> > > translations, then Marmen may be right.

I am not convinced that this reuse is as sophisticated as it looks.

> > (Please note correct spelling of my name.)
> 
> Sorry about that.

That’s OK.

> Cheers,  
> Walter

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![andras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@andras](https://www.ruby-forum.com/u/andras)\
**Post date:** [September 10, 2010, 12:14am UTC](https://www.ruby-forum.com/t/i18n-assets-management-translation-ui/194534/9 "2010-09-10T00:14:20Z")

</div>

I take your points and I have certainly considered many of them. Like  
many things, there are design tradeoffs and you have to weigh them in  
your particular situation. I’m quite aware that linguistically these  
patterns aren’t always useful and that is why they can be opted out of  
easily. They have sped up the process of translation for us, though  
(Chinese, Arabic, and Te Reo MÄori so far). The professional  
translators for Chinese worked with Excel…

It should be noted that the “base” translations that act as building  
blocks are in supplement to standard named translation keys that  
correspond to the controller/action pattern of naming that you talk  
about with PO. I.e. if I’m translating “accounts.new.welcome”, it  
will be in app/views/accounts/new template. It just may be that the  
value in the locale’s .yml file is derived from base.welcome.

Anyway, I imagine I’m providing more detail than is needed.

Cheers,  
Walter
