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 (
Edwin Moss (author)
Thu Dec 17 08:57:26 -0800 2009
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Jun 06 21:09:36 -0700 2008 | |
| |
locales/ | Tue Dec 15 14:17:00 -0800 2009 | |
| |
readme.txt | Thu Dec 17 08:57:26 -0800 2009 |
readme.txt
Contributions welcome!
Option 1:
Download the all the files in locales folder and it's sub-folders into your app's config/locales folder.
Create 'config/initializers/locales.rb' with the following:
I18n.locale = 'en'
Option 2:
Download the locales folder into your app's config folder.
Create 'config/initializers/locales.rb' the following:
I18n.locale = 'en'
LOCALE_OPTIONS = []
Dir["#{File.dirname __FILE__}/../locales/active_scaffold/*.*"].each {|file|
LOCALE_OPTIONS << File.split(file)[1].split(".")[0]
I18n.load_path << file
}
Dir["#{File.dirname __FILE__}/../locales/rails/*.*"].each {|file|
I18n.load_path << file
}
Then if you want to use LOCALE_OPTIONS in your form:
<% form_tag(:action => "change_language") do %>
<%= select_tag(nil, options_for_select([as_(:_select_)] + LOCALE_OPTIONS.collect {|locale|
[I18n.backend.translate(locale, :locale_name), locale]}, I18n.locale.to_s), {:name => :lang_code, :onchange =>
"javascript:submit();"}) %>
<% end %>






