This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Jun 29 16:27:25 -0700 2008 | [leethal] |
| |
MIT-LICENSE | Fri May 16 15:24:11 -0700 2008 | [leethal] |
| |
README | Tue Jul 01 05:20:21 -0700 2008 | [leethal] |
| |
Rakefile | Fri May 16 11:26:46 -0700 2008 | [leethal] |
| |
TODO | Mon Jul 07 01:03:15 -0700 2008 | [leethal] |
| |
init.rb | Tue Jul 01 05:20:21 -0700 2008 | [leethal] |
| |
lib/ | Tue Jul 01 05:49:19 -0700 2008 | [leethal] |
| |
test/ | Tue Jul 01 05:49:19 -0700 2008 | [leethal] |
README
= Localized Frontend http://gitorious.org/projects/localized-frontend/ http://github.com/leethal/localized-frontend/ Localizing the front-end of single language Rails apps. The localizations are stored in YAML files. Create a spanish.yml file, call LocalizedFrontend.in :spanish somewhere in your app (probably in environment.rb or an initializer), and rejoice! It localizes inflectors (pluralize, singularize etc), Active Record error messages, month and day names, form labels (<%= f.label :foo %>) and Array#to_sentence. == To contributors Feel free to submit your own translations and localizations! You can mail me patches on augustlilleaas@gmail.com, or you can fork the Git repository on http://github.com/leethal/localized-frontend/ and send a pull request. Or write it down on paper and mail it to me. Your call! Keep in mind that the YAML file is whiny - certain keys and values are required in order to avoid errors being raised. At the moment, the tests are hardcoded in Norwegian. That should probably change, so that one can set the language in an environment variable and run the tests in whatever language one might prefer. Also, the code is fairly hard to grok, as it's mostly monkey patches. Feel free to improve the readability of the code! == What it does Here's a short list of features (examples are in norwegian) Localizing %b, %B, %a and %A in Time#strftime, Date#strftime and DateTime#strftime * Time.now.strftime('%b') => okt * Time.now.strftime('%b') => oktober * Time.now.strftime('%a') => søn * Time.now.strftime('%A') => søndag Localized inflections. "bil".pluralize => "biler" Localizing attribute names in ActiveRecord. class Question < ActiveRecord::Base localized_fields :question => "Spørsmål", :answer => "Svar" end == TODO * Make tests runnable in any language. In other words, don't let tests be hardcoded in Norwegian. Copyright (c) 2008 August Lilleaas, released under the MIT license




