Skip to content

rdavila/i18n_fallback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I18n Fallback

The main idea of this plugin is to allow a fallback locale when the lookup for the current locale fail.

Quick explanation

To configurate the fallback locale:

config.i18n.fallback_locale = :es #default is :en

Now if you have this translations:

#en.yml
en:
  hello: Hello world!

#es.yml
es:

Then if you have this:

<%= t 'hello' %>

the #translate helper will use the 'en' translation when the current locale is 'es' because the 'hello' keyword is not found on the 'es' translation file.

That it's all!

Copyright (c) 2009 Rubén Dávila Santos, released under the MIT license

About

Rails plugin to configure a fallback locale for i18n

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published