Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Enhanced documentation to describe include_default_locale feature #45

Merged
merged 1 commit into from

3 participants

@widescape

This should help people to find the solution more quickly.
See #23

@katafrakt

+1 for merging it. I was just looking for this exact infrormation.

@simi simi merged commit 14761c1 into svenfuchs:master

1 check failed

Details default The Travis build could not complete due to an error
@simi
Collaborator

@katafrakt @widescape sorry I missed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 0 deletions.
  1. +10 −0 README.markdown
View
10 README.markdown
@@ -60,6 +60,16 @@ Filters can also accept options:
filter :locale, :exclude => /^\/admin/
end
+The locale filter may be configured to not include the default locale:
+
+ # in config/initializers/routing_filter.rb
+ # Do not include default locale in generated URLs
+ RoutingFilter::Locale.include_default_locale = false
+
+ # Then if the default locale is :de
+ # products_path(:locale => 'de') => /products
+ # products_path(:locale => 'en') => /en/products
+
### Testing
RoutingFilter should not be enabled in functional tests by default since the Rails router gets
Something went wrong with that request. Please try again.