Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n for submit button #349

Closed
zhdwwf opened this issue Aug 7, 2011 · 4 comments
Closed

I18n for submit button #349

zhdwwf opened this issue Aug 7, 2011 · 4 comments

Comments

@zhdwwf
Copy link

zhdwwf commented Aug 7, 2011

When I use i18n to translate an application,the submit button can not display my language.How can I solve it? Thanks!

@whatthewhat
Copy link
Contributor

Not a perfect solution, but you could use custom forms:

...
form do |f|
  f.inputs
  f.buttons do
    f.submit I18n.t('submit')
  end
end
...

@zhdwwf
Copy link
Author

zhdwwf commented Aug 8, 2011

Thanks! That's work.

@zhdwwf zhdwwf closed this as completed Aug 8, 2011
@rodrigopinto
Copy link

Hey guys, I've just found a better solution, and i would share.
In fact, is just add this piece of code on you locale file, because the submit button is internationalized on formtastic.

en:
  formtastic:
    :yes: 'Yes'
    :no: 'No'
    :create: 'Create %{model}'
    :update: 'Update %{model}'
    :submit: 'Submit %{model}'
    :required: 'required'

Cheers,
Rodrigo

@jerefrer
Copy link

I just ran into this problem myself, found out the solution by myself en then thought I would share it here ... Only to discover it had been figured out for a year now !

Maybe now would be the time to add the formtastic locale file into ActiveAdmin so future users won't have to go down this road again ? Or maybe document it a bit better ?

What do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants