Skip to content

Commit

Permalink
Update documentation about DOMAIN_NAME variable for Google Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
monfresh committed Mar 20, 2014
1 parent fdef6ac commit 0e8b14f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,23 @@ def set_translation_cookie
cookies.delete(:googtrans, :domain => ".www.#{ENV['DOMAIN_NAME']}")

# set translation cookie

# The "DOMAIN_NAME" environment variable should be set
# to your app's domain name in production, and to "lvh.me"
# in development. Translation won't work with "localhost",
# so please open the site locally via http://lvh.me:{port number}
# to your app's domain name, without the subdomain.
# If you're on Heroku, that means setting it to "herokuapp.com".
# If you have a custom domain name, like "www.smc-connect.org", that
# means setting it to "smc-connect.org".

# In development, it should only be set to a 2-level domain name,
# like "lvh.me", or "myapp.dev" if you're using Pow. You can set it in
# config/application.yml.

# Translation won't work with "localhost", so please open the site
# locally via http://lvh.me:{port number}

# Read more about lvh.me here:
# http://matthewhutchinson.net/2011/1/10/configuring-subdomains-in-development-with-lvhme
# Pow should work too if you prefer that: http://pow.cx/
cookies[:googtrans] = {
value: "/en/#{@current_lang}",
domain: "#{ENV['DOMAIN_NAME']}"
Expand Down

0 comments on commit 0e8b14f

Please sign in to comment.