README.md in contact_us-1.1.0 vs README.md in contact_us-1.2.0
- old
+ new
@@ -66,10 +66,16 @@
To redirect to a specific URL after a successful form submission:
```ruby
config.success_redirect = '/contact-success'
```
+If you're using I18n localization and would like to have the locale be a part of your paths
+For example: /en/contact-us OR /fr/contact-us OR /en-UK/contact-us
+```ruby
+config.localize_routes = true
+```
+
### Views
To copy the view files to `app/views/contact_us`, and customize them to suit your needs run:
```shell
@@ -83,9 +89,12 @@
```shell
bundle exec rake contact_us:copy_locales
```
Please feel free to submit your own locales so that other users will hopefully find this gem more useful in your language.
+
+If you would like to include the locale in your paths (e.g. /en/contact-us), set the localize_routes
+parameter to true in your initializer (see the configuration section above)
### Formtastic
In order to use a Formtastic compatible template to hook into your custom form styles configure `config/initializers/contact_us.rb`: