Adjusting Width of Admin Filter and Translating Text in Relation Field

Support MB Relationships Adjusting Width of Admin Filter and Translating Text in Relation Field

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #47451
    Simon EgleSimon Egle
    Participant

    I have created a relation field and enabled the admin filter. However, the width of the filter field is very small. Is it possible to make it wider? If so, could you provide a code snippet for this?

    Additionally, I would like to translate the text “Please enter 1 or more characters” into another language. Is there a code snippet available to customize this text?

    Thank you very much for your help! I’ve attached a screenshot for reference.

    Simon

    #47467
    PeterPeter
    Moderator

    Hello Simon,

    1. There isn't an option to change the width of the filter field. It will show the proper width for the length of the filter title. You can change the filter title when editing the relationship and see how it works. Please check these screenshots https://imgur.com/a/MxohpEj

    2. The text "Please enter 1 or more characters" is hard-coded in the select2 JS file https://github.com/wpmetabox/meta-box/blob/master/js/select2/i18n/en.js

    inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"}

    it isn't possible to translate the text in the JS file like that.

    And please notice that, supporting customization code is beyond our scope of support. If you want to customize your site, we offer a customization service. You can contact us here for more details https://metabox.io/contact/

    #47481
    Simon EgleSimon Egle
    Participant

    Hello Peter,

    Thank you for the information. I noticed that this file is also available in German.

    https://github.com/wpmetabox/meta-box/blob/master/js/select2/i18n/de.js

    Why is it being displayed in English for me? I have both German and English installed in WordPress, but selected German.

    #47500
    PeterPeter
    Moderator

    Hello,

    Currently, only text in the English language will be displayed. I will inform the development team to improve this feature in future updates.

    Thank you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.