How do I localize field labels?

21 views
Skip to first unread message

Karina Taubert

unread,
Jan 25, 2017, 5:32:23 AM1/25/17
to comfortable-mexican-sofa
I use the English field names, e.g. meta_description as in the Wiki entry.
But as my editors are German-speakers, I want to tell the system to display the label in the page editing form not as "Meta Description" but something like "Kurzbeschreibung".
I can see that some standard field names like 'title' are localised. What is the best way to add localization for my custom field names?

Karina Taubert

unread,
Jan 25, 2017, 6:40:10 AM1/25/17
to comfortable-mexican-sofa
Ok, I figured this out myself by unpacking the gem. Have added the information to the Wiki: https://github.com/comfy/comfortable-mexican-sofa/wiki/Using-Fields
Basically you just add a localisation for the field in question. The route for the meta_description field looks like this:
de:
  activerecord:
    attributes:
      comfy/cms/page:
        meta_description: "Kurzbeschreibung"

Reply all
Reply to author
Forward
0 new messages