[repater_field_type] How to translate "add_row", "collapse", "expand" and "delete" Button in module development?
Created 7 years ago by annelaim

Hello world!;

I glade to use PyroCMS, it's an awesome CMS with laravel features, and that so good,

Anyway,i would like to make a module for pyro, And in an admin section i use a repeater field for add multiple object in a form.

But i can't translate any buttons in the repeater form, such "add_row" button text...

Who we can do that in module developpement, please? is there a tutorial, or anything to follow?

And, I think a little demo in the module tutorial video will be a good point 😄

Thanks for regards.

ryanthompson  —  7 years ago Best Answer

There is a config option you can use for that sorry! I've updated translation:

https://pyrocms.com/documentation/grid-field-type/latest#introduction/configuration https://pyrocms.com/documentation/repeater-field-type/latest#introduction/configuration

Thank you for the kind words! Glad you like Pyro 😊

piterden  —  7 years ago

Could propose you to use casual translations system. These values translating exactly like any other values in PyroCMS/StreamsPlatform/Laravel.

ryanthompson  —  7 years ago Best Answer

There is a config option you can use for that sorry! I've updated translation:

https://pyrocms.com/documentation/grid-field-type/latest#introduction/configuration https://pyrocms.com/documentation/repeater-field-type/latest#introduction/configuration

Thank you for the kind words! Glad you like Pyro 😊

ryanthompson  —  7 years ago

PS - collapse and delete are not configurable but you can use the translator module to help you easily PR a translation:

https://pyrocms.com/posts/translator-module-v1-0

annelaim  —  7 years ago

Thanks for your fast answer;

I'm glad to see how to translate the "add_row" button,

I've got a last question: in the config, "add_row", what type of value it takes? Is this a hardcoded text or it can a value how we can translate? like another button or field?

Thanks for all, and I wich you a good luck for all;

annelaim  —  7 years ago

ok, My bad, i found it! just wrote it as well as seen it in the documentation. Thanks for all, it make my day easier :D

Good luck for rest!