Skip to content

Commit

Permalink
improve localized server instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkxin committed May 5, 2014
1 parent 29aaf87 commit 048fda8
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions README.md
Expand Up @@ -33,9 +33,32 @@ Then open <http://localhost:9292> in a web browser, and verify that you can navi
To serve sites from "sites/en", use `rake run` or a vanilla deploy.

To server sites from another locale (say, "es" or Spanish)...
* Locally, use the SITE_LOCALE environment variable: `SITE_LOCALE=es rake run`
* On a server, make the server respond to a locale subdomain: `http://es.railsbridge.org`
* Or to temporarily test, use a `locale` or `l` parameter: `http://docs.railsbridge.org/?l=es` (note that in this mode, links are not rewritten, so if they fail you will have to manually add the parameter again)

### Run Localized Site Locally

$ SITE_LOCALE=es rake run

The server listens on `0.0.0.0:9292`.

Now you have to setup subdomain for the site. If you have Pow, run:

$ echo 9292 > ~/.pow/railsbridge # works for any subdomain

If you don't have Pow, add the following line to `/etc/hosts`:

127.0.0.1 es.railsbridge.dev # works for single subdomain

Now you can access `http://es.railsbridge.dev:9292` for debugging.

### Running on a Server

Just make sure the server responds to a locale subdomain: `http://es.railsbridge.org`

### Temporary Testing

Use a `locale` or `l` parameter: `http://docs.railsbridge.org/?l=es`.

Note that in this mode, links are not rewritten, so if they fail you will have to manually add the parameter again.

## Contributing

Expand Down

0 comments on commit 048fda8

Please sign in to comment.