Getting started
Get Globalize!
Generally we recommend using the Rails plugin install script via Subversion:
- script/plugin install http://svn.globalize-rails.org/svn/globalize/branches/for-1.2 (this is for Rails 1.2)
- script/plugin install http://svn.globalize-rails.org/svn/globalize/branches/for-1.1 (this is for Rails 1.1)
- script/plugin install http://svn.globalize-rails.org/svn/globalize/trunk (this is edge Globalize)
If you have problems with Subversions, e.g. because you’re behind a restrictive firewall, you might want to use the tar files:
- http://globalize.artweb-design.de/20070316/globalize_for-1_2.tar.gz
- http://globalize.artweb-design.de/20070316/globalize_for-1_1.tar.gz
- http://globalize.artweb-design.de/20070316/globalize_trunk.tar.gz
How to install
From your rails app root directory:
- script/plugin install svn://svn.globalize-rails.org/globalize/branches/for-1.1
- rake globalize:setup
...and you’re globalized, dude!
Also, you might want to:- Get edge Globalize instead of stable: svn://svn.globalize-rails.org/globalize/trunk
- Add
include Globalizeto yourenvironment.rbfile, so that you won’t have to typeGlobalize::Locale.setall the time. Instead, you can just typeLocale.set. - Add Language and Country fixtures if your code references any models provided Globalize. Look in
vendor/plugins/globalize/test/fixturesfor a template.
Optionally, try:
rake globalize:test
globalize plugin testing has it’s own database.yml file, so make sure to configure it before running the tests. it’s found in the directoryRAILS_ROOT/vendor/plugins/globalize/test/configrake doc:plugins
This createsHTMLdocumentation in theRAILS_ROOT/doc/plugins/globalizedirectory.
Get started
There are several walkthrough- or howto-style articles available, each taking a different approach. We don’t garantuee for the freshness of the presented information though.
- Sven’s Globalize Writeup – has sometimes been refered to as “the best documentation available for Globalize”
- Example Application – takes you step by step through the process of creating a Globalized example application
- Unit-tested Example – a walkthrough using a test-driven approach by Josh Harvey
Also relevant:
- The Internal Storage Mechanism For Globalize for Rails Model Translations – Saimon’s comprehensive intro and overview to Globalize’s alternative model translations storage mechanism
Find more howtos, tutorials and articles in the documentation section
Also, be sure to subscribe to our mailing list and check out our documentation
revision 1 · 03.06.09 09:27 · by: Marko Seppä