Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Would it be possible to support i18n for the label and button.
Simply adding a t() at a couple of place would fix the issue.
Thanks.
Comments
Comment #1
jdanthinne CreditAttribution: jdanthinne commentedSupport for i18n is included in the custom_search_i18n_submodule.
Which label and button are you trying to translate?
Comment #2
webadpro CreditAttribution: webadpro commentedWell, Search box Label & Submit button text.
I know its not recommended but having:
rather than:
Would do it.
Comment #3
jdanthinne CreditAttribution: jdanthinne commentedThis is already working… I've just tested it on a fresh install.
I've entered the text strings in Custom Search settings /admin/config/search/custom_search.
Then in admin/config/regional/translate/translate, I limit the search to "Custom Search", all the strings are there, ready to be translated.
Comment #4
RaulMuroc CreditAttribution: RaulMuroc commentedCould you put the steps? Everything is mixed: use t() somewhere, apply sub-module Custom Search internationalitzation... would be nice to have it step-by-step.
Thanks.
Comment #5
RaulMuroc CreditAttribution: RaulMuroc commentedNothing. Is true, Custom Search already support translation. You just have to active: Custom Search Internationalization and translate the strings through Translate UI of I18n ;-)
Comment #6
nick2006 CreditAttribution: nick2006 commentedHi,
I want to use Custom search paths in the form path|label, but I can not translate labels.
Is there any way?
Comment #7
jdanthinne CreditAttribution: jdanthinne commentedPlease open a new issue for that, please.