app/views/layouts/people.html.erb
(...)
<%= yield %>
<%= render :partial => "layouts/language_bar" %>
(...)
And with that, the localization is complete. All static resources have been translated
into Spanish, and we have added all necessary features to allow users to choose a
locale. See Figures 8-7 through 8-10 for screenshots of the completed application.
Figure 8-7. Spanish translation: blank state of an empty address book
Further Reading | 269
Further Reading
Sven Fuchs has a great write-up about Globalize on his blog (http://www.artweb-design.
de/2006/11/10/get-on-rails-with-globalize-comprehensive-writeup). The Globalize site
(http://www.globalize-rails.org/) has plenty of information on setting up Globalize.
There is a mailing list for developers involved with internationalization in Rails. The list
information page is available at http://rubyforge.org/mailman/listinfo/railsi18n-discussion.
The Ruby on Rails wiki has a page with good coverage of the current i18n options at
http://wiki.rubyonrails.com/rails/pages/InternationalizationComparison.
Figure 8-8. Spanish translation: creating a new person
270 | Chapter 8: i18n and L10n
Figure 8-9. Spanish translation: viewing a newly created person
Figure 8-10. Spanish translation: viewing all people; one created
271
Chapter 9 CHAPTER 9
Incorporating and Extending Rails9
The best way to predict the future is to invent it.
Pages:
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412