Changing the separator 'and' in the nested field list table

20 views
Skip to first unread message

Francisco Muñoz

unread,
May 5, 2017, 2:11:25 PM5/5/17
to rails_admin
Hi, want to know how can I translate this word in the list of my nested fields in rails_admin, hope you can help me
 
I left an image, so you can understand my question

thanks in advance


Eduardo Moreno

unread,
May 5, 2017, 2:49:52 PM5/5/17
to rails...@googlegroups.com
Hi Francisco, 

I'm guessing you need to translate the word "and" to "y" which is the proper connective in Spanish, this is not rails_admin related, just i18n.

If that's the case, then you should change a couple of things:

1) In application.rb you have to set the locale to "es", you also should change your timezone as well: 
    config.i18n.default_locale = :es
    config.time_zone = 'La Paz'

With this command you can see all available timezones
rake time:zones:all


2) Now you have to create a file config/initializers/locales/es.yml with this content:

I think you are looking for this lines, it goes under one level inside "es:" , I'm going to put an extract here:
  support:
    array:
      last_word_connector: " y "
      two_words_connector: " y "
      words_connector: ", "
I hope this helps you, if not let me know.


--
You received this message because you are subscribed to the Google Groups "rails_admin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails_admin+unsubscribe@googlegroups.com.
To post to this group, send email to rails...@googlegroups.com.
Visit this group at https://groups.google.com/group/rails_admin.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages