Plugins - Error_Messages_Localized_For

StarAdd to favorites

ErrorMessagesLocalizedFor?

=========================

This is a plugin for localizing your fieldnames, you will need the localization plugin, this can be found at http://wiki.rubyonrails.org/rails/pages/Localization+Plugin.` You can easily install localization by executing: "script/plugin install localization" from your project root.

Just type in the translation of your fieldnames and modelnames in /lang/translation.rb(or your custom file), the reference in translation.rb must all be downcase. Example:

model:
l.store 'user','Person'
fieldnames:
l.store 'email','E-mail'
l.store 'password','Password'
also translate:

l.store 'error','error'
l.store 'prohibitedthis',prohibited this'
l.store 'fromsaving','from being saved'
l.store 'fieldproblems','There were problems with the following fields:'
you can use inflector in /config/environment.rb to pluralize the name 'error' in the language requested by you, if "l.store 'error','fout'" :

Inflector.inflections do |inflect|
inflect.plural /fout/, 'fouten'
end
then use the error_messages_localized_for 'model' instead of error_messages_for 'model' in your views.

Habbekratz

http://code.google.com/p/error-messages-localized/

http://error-messages-localized.googlecode.com/svn/trunk/error_messages_localized_for/

Rails' (MIT)

  • Currently 5.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Internationalization

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.
Recruiting software

Have a comment?