# Different Load Mechanism for I18n

**URL:** <https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980>\
**Category:** Rails I18n\
**Created:** [February 5, 2010, 3:42pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980 "2010-02-05T15:42:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 5, 2010, 3:42pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/1 "2010-02-05T15:42:12Z")

</div>

I’ve spent some time developing a plugin for i18n.

What it actually does, is to extend the i18n to support different load  
mechanisms.  
First of all there is the simple everyone knows.

Then i created a new Loader which loads the files from directories  
like the classic one.  
But when loading the content of a file, it is not just merged all  
together.  
What it actually does is checkout where the translation file is  
located and depending on it’s path, it pushes the translations in that  
position in the translation hash.

For me the translation files look more dry.

I don’t know if it’s usefull to somebody, but check it out:  
[http://github.com/menostos/i18n\_nested](http://github.com/menostos/i18n_nested)

---

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 5, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/2 "2010-02-05T18:31:21Z")

</div>

is more faster than default?

2010/2/5 menostos [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> What it actually does is checkout where the translation file is  
> You received this message because you are subscribed to the Google G.  
> “rails-i18n” group.  
> To post to this group, send email to removed\_email\_address@domain.invalid.  
> To unsubscribe from this group, send email to  
> removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> .  
> For more options, visit this group at  
> [http://groups.google.com/group/rails-i18n?hl=en](http://groups.google.com/group/rails-i18n?hl=en).

–  
Experiencia es lo que obtienes, cuando no obtienes lo que quieres.

---

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 6, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/3 "2010-02-06T12:24:06Z")

</div>

actually i think not, because you’re probably gone load more files  
than before. but the translation will still be as fast as before.

i don’t know if it matters if it’s faster because i don’t think many  
of production applications going to load translations on each request.

---

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 6, 2010, 12:34pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/4 "2010-02-06T12:34:38Z")

</div>

2010/2/6 menostos [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> actually i think not, because you’re probably gone load more files  
> than before. but the translation will still be as fast as before.
> 
> i don’t know if it matters if it’s faster because i don’t think many  
> of production applications going to load translations on each request.
> 
> is true. Thanks

> > > mechanisms.  
> > > For me the translation files look more dry.  
> > > removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > "Caminar sobre el agua y desarrollar software a partir de unas  
> > > For more options, visit this group at  
> > > [http://groups.google.com/group/rails-i18n?hl=en](http://groups.google.com/group/rails-i18n?hl=en).

–  
Experiencia es lo que obtienes, cuando no obtienes lo que quieres.

---

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 6, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/5 "2010-02-06T19:09:07Z")

</div>

Nice!

I’ve added this to the wiki: [http://rails-i18n.org/wiki](http://rails-i18n.org/wiki)

---

<div class="post-metadata">

**Author:** ![menostos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@menostos](https://www.ruby-forum.com/u/menostos)\
**Post date:** [February 12, 2010, 8:25am UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980/6 "2010-02-12T08:25:50Z")

</div>

Seems like it has already been removed from the wiki…
