Skip to content

Commit 84e9c5e

Browse files
authored
Merge pull request rails#52662 from deraru/doc/update-18n-guide
Update i18n guide with local testing setup instructions [ci skip]
2 parents 7059d3c + 62eb8b3 commit 84e9c5e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

guides/source/i18n.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,11 @@ We can also set the locale from the _subdomain_ in a very similar way:
196196
```ruby
197197
# Get locale code from request subdomain (like http://it.application.local:3000)
198198
# You have to put something like:
199-
# 127.0.0.1 gr.application.local
199+
# 127.0.0.1 it.application.local
200200
# in your /etc/hosts file to try this out locally
201+
#
202+
# Additionally, you need to add the following configuration to your config/environments/development.rb:
203+
# config.hosts << 'it.application.local:3000'
201204
def extract_locale_from_subdomain
202205
parsed_locale = request.subdomains.first
203206
I18n.available_locales.map(&:to_s).include?(parsed_locale) ? parsed_locale : nil

0 commit comments

Comments
 (0)