Ruby-Locale and Ruby on Rails 2.2 sample

[source code]

The values from Rails

VariablesValues
HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
QUERY_STRING
params[:lang]nl
cookies[:lang]

This page is for nl only. See app/views/samples/_part_nl.html.erb.

[BACK]

Separate Localized View template file in each languages

View template can be separeted with language tags.

  1. uz_UZ has special index page(index_uz_UZ.html.erb)
  2. uz uses normal index page
  3. nl has special _part page(_part_nl.html.erb)
  4. nl_BE also uses the special _part page(_part_nl.html.erb)