Skip to content

Commit

Permalink
added I18n support
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Feb 7, 2012
1 parent 089d511 commit 1c94d89
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
16 changes: 16 additions & 0 deletions README.markdown
Expand Up @@ -156,6 +156,22 @@ You can add as many options to any form helper tag. If they are interpreted by B
</tr>
</table>

Internationalization/Custom Errors
----------------------------------
As of `1.0.2`, `bootstrap_forms` supports I18n! More support is being added, but you can change the error header and cancel button like this:

```yaml
# config/locales/en.yml
en:
bootstrap_forms:
errors:
header: 'Your %{model} is wrong!'
buttons:
cancel: 'Forget it!'
```

Obviously you can also change to a different `lang.yml` file and use the same syntax.

Contributing
------------
I'm pretty dam active on github. Fork and submit a pull request. Most of my pull requests are merged the same day. Make sure you:
Expand Down
2 changes: 1 addition & 1 deletion bootstrap_forms.gemspec
Expand Up @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)

Gem::Specification.new do |s|
s.name = "bootstrap_forms"
s.version = "1.0.1"
s.version = "1.0.2"
s.author = "Seth Vargo"
s.email = "sethvargo@gmail.com"
s.homepage = "https://github.com/sethvargo/bootstrap_forms"
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap_forms.rb
@@ -1 +1 @@
require 'bootstrap_forms/railtie' if defined?(Rails)
require 'bootstrap_forms/engine' if defined?(Rails)
@@ -1,11 +1,7 @@
module BootstrapForms
class Railtie < ::Rails::Railtie
class Engine < ::Rails::Engine
config.after_initialize do |app|
require 'bootstrap_forms/initializer'
end

initializer 'bootstrap_forms.initialize' do |app|

end
end
end

0 comments on commit 1c94d89

Please sign in to comment.