# Announcement: Really simple localization plugin

**URL:** <https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788>\
**Category:** Rails I18n\
**Created:** [August 15, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788 "2006-08-15T14:19:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/u/Jesper_RSSSSnn-Jens)\
**Post date:** [August 15, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788/1 "2006-08-15T14:19:00Z")

</div>

I needed something simpler than Globalize and GLoc to localize my Rails  
application into Danish. I packed it into this plugin. Feel free to use  
it.  
Languages available: Spanish, German, Swedish, Danish, and (“Swedish  
Chef”  
for the fun of it)

Plugin available at [http://visitjesper.homeip.net/plugins/](http://visitjesper.homeip.net/plugins/)  
IMPORTANT: Plugin directory likely to move to more appropriate location  
anytime

The goal is to have a dead simple plugin for one-language (non-english)  
Rails applications.  
Many of the existing localization/internationalization plugins are too  
big  
for this and hard to get started with.  
Just dump this plugin in /vendor/plugins/, set your language and off you  
go.

Unlike the more advanced plugins, you don’t have to translate anything  
in  
your view files. Just use the standard Rails commands you’re used to.  
The simple approach also makes limits. Make sure you understand them to  
decide if this plugin is right for you.

===What it does  
This plugin modifies the following most used helpers for Rails

- Sets UTF-8 content-type HTTP header
- Sets UTF-8 connection to database
- Localized monthnames on date\_select etc. (but not changing the order  
of  
Y-M-D)
- Localized ActiveRecord errors (and error headings)
- Localized distance\_of\_time\_in\_words
- Localized to\_currency (but not changing the order of unit/currency)
- Simple pluralization also available in the lang-file (but currently  
only  
used for pluralizing “error”=\>“errors” in local language)
- Changes standard Rails methods. In this way, there’s no tedious  
rewrite of  
localization functions in your view files
- Languages available: Spanish, German, Swedish, Danish, and (“Swedish  
Chef”  
for the fun of it)

Read more in the README file of the project.

If you want to help out, I’d really like you to translate into more  
languages. See more under TODO in the README file.  
Also, since this is my first plulgin, any feedback is welcome. There is  
probably something I can do smarter…

As a side note: Is there somebody here who want’s to translate it into  
“Pirate speak” (world Talk like a pirate day is coming soon…)

---

<div class="post-metadata">

**Author:** ![Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/u/Jesper_RSSSSnn-Jens)\
**Post date:** [August 15, 2006, 5:03pm UTC](https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788/2 "2006-08-15T17:03:47Z")

</div>

Hi Jesper,

I’ve been doing something similar myself and also ran into this problem:

# Modification of ruby constants

class Date #:nodoc:  
#FIXME as these are defined as Ruby constants, they can’t be  
overwritten  
MONTHNAMES =LocalizationSimplified::DateHelper::Monthnames  
ABBR\_MONTHNAMES =LocalizationSimplified::DateHelper::AbbrMonthnames  
DAYNAMES =LocalizationSimplified::DateHelper::Daynames  
ABBR\_DAYNAMES =LocalizationSimplified::DateHelper::AbbrDaynames  
end

I don’t know if it’s really a problem though, it runs fine on my dev  
server, but you get the ugly warnings though…

I’d also be interested in translating this into Dutch.

Cheers,

Jeroen

Jesper RÃ¸nn-Jensen wrote:

> I needed something simpler than Globalize and GLoc to localize my Rails  
> application into Danish. I packed it into this plugin. Feel free to use  
> it.  
> Languages available: Spanish, German, Swedish, Danish, and (“Swedish  
> Chef”  
> for the fun of it)
> 
> Plugin available at [http://visitjesper.homeip.net/plugins/](http://visitjesper.homeip.net/plugins/)  
> IMPORTANT: Plugin directory likely to move to more appropriate location  
> anytime
> 
> The goal is to have a dead simple plugin for one-language (non-english)  
> Rails applications.  
> Many of the existing localization/internationalization plugins are too  
> big  
> for this and hard to get started with.  
> Just dump this plugin in /vendor/plugins/, set your language and off you  
> go.
> 
> Unlike the more advanced plugins, you don’t have to translate anything  
> in  
> your view files. Just use the standard Rails commands you’re used to.  
> The simple approach also makes limits. Make sure you understand them to  
> decide if this plugin is right for you.
> 
> ===What it does  
> This plugin modifies the following most used helpers for Rails
> 
> - Sets UTF-8 content-type HTTP header
> - Sets UTF-8 connection to database
> - Localized monthnames on date\_select etc. (but not changing the order  
> of  
> Y-M-D)
> - Localized ActiveRecord errors (and error headings)
> - Localized distance\_of\_time\_in\_words
> - Localized to\_currency (but not changing the order of unit/currency)
> - Simple pluralization also available in the lang-file (but currently  
> only  
> used for pluralizing “error”=\>“errors” in local language)
> - Changes standard Rails methods. In this way, there’s no tedious  
> rewrite of  
> localization functions in your view files
> - Languages available: Spanish, German, Swedish, Danish, and (“Swedish  
> Chef”  
> for the fun of it)
> 
> Read more in the README file of the project.
> 
> If you want to help out, I’d really like you to translate into more  
> languages. See more under TODO in the README file.  
> Also, since this is my first plulgin, any feedback is welcome. There is  
> probably something I can do smarter…
> 
> As a side note: Is there somebody here who want’s to translate it into  
> “Pirate speak” (world Talk like a pirate day is coming soon…)

---

<div class="post-metadata">

**Author:** ![Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/u/Jesper_RSSSSnn-Jens)\
**Post date:** [August 18, 2006, 12:20pm UTC](https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788/3 "2006-08-18T12:20:04Z")

</div>

Great Jeroen.  
Please send me your translated lang-file and I’ll include it in the next  
release.  
Oh i found a bug and updated the released files yesterday after our  
Copenhagen Rails Meetup. I also added an extra placeholder for day of  
week  
on time conversions (of activesupport).  
Please use the updated lang\_en.rb file found at  
[http://visitjesper.homeip.net/plugins/localization\_simplified/lib/lang\_de.rb](http://visitjesper.homeip.net/plugins/localization_simplified/lib/lang_de.rb)

as a template.

Thanks!  
/Jesper

On 8/15/06, Jeroen H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ABBR\_MONTHNAMES =LocalizationSimplified::DateHelper::AbbrMonthnames
> 
> > Plugin available at [http://visitjesper.homeip.net/plugins/](http://visitjesper.homeip.net/plugins/)
> > 
> > - Sets UTF-8 connection to database  
> > rewrite of  
> > Also, since this is my first plulgin, any feedback is welcome. There is
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Railsi18n-discussion mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/railsi18n-discussion](http://rubyforge.org/mailman/listinfo/railsi18n-discussion)

–

---

<div class="post-metadata">

**Author:** ![Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/u/Jesper_RSSSSnn-Jens)\
**Post date:** [August 18, 2006, 12:56pm UTC](https://www.ruby-forum.com/t/announcement-really-simple-localization-plugin/64788/4 "2006-08-18T12:56:10Z")

</div>

Embarrassing: The link should have been to the English file and not the  
German file  
Here’s the correct link:  
[http://visitjesper.homeip.net/plugins/localization\_simplified/lib/lang\_en.rb](http://visitjesper.homeip.net/plugins/localization_simplified/lib/lang_en.rb)
