All States and Cities: How can I translate the field labels?

  • duda_nill
    Perguntado em 12 de setembro de 2023 às 14:14

    boa Tarde, gostaria de saber como fazer pra essas palavras: State (113 cities), City, Find city, Show cities Dropdown ficar em português do brasil.

    por favor dá uma olhada no anexo.All States and Cities: How can I translate the field labels?  Image 1 Screenshot 20

  • Sarah Jotform Support
    Respondido em 12 de setembro de 2023 às 17:44

    Hi duda_nill,

    Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Portuguese, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. The State and Cities widget currently does not have the ability to be translated. I'm following up with our team to see if we have a workaround to hide the labels City and State so you can input translation information in the element title. As soon as we have an update regarding this, we'll circle back to this thread.

    That being said, I can also put in a feature request to allow these labels to be translated. We've gone ahead and escalated your request to our developers, but when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    Thanks for your patience and understanding, we appreciate it.

  • Sweta Jotform Support
    Respondido em 13 de setembro de 2023 às 00:48

    Hi duda_nill,

    The following CSS code can be used to translate the State and Cities text:

    #statesContainer label::after {
     content: 'Estado';
    font-size:17px;
    }
    #citiesContainer label::after {
     content: 'Cidades';
    font-size:17px;
    }
    label{
    font-size:0px;
    }
    ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
     color: white;
    }
    ::-moz-placeholder { /* Firefox 19+ */
     color: white;
    }
    :-ms-input-placeholder { /* IE 10+ */
     color: white;
    }
    :-moz-placeholder { /* Firefox 18- */
     color: white;
    }
    #citiesButton::after {
    font-size: 16px;
    content: 'mostrar cidades no menu suspenso';
    height: 40px;
    border-radius: 4px;
    background: #18bd5b;
    border: 0;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
    display: inline;
    }
    #citiesButton {
    font-size: 0px;
    }

    I'll walk you through setting that up:

    • Open the Form in the Form Builder.
    • Open the Widget Settings by clicking the wand icon.
    • Go to the Custom CSS tab and inject your codes.
    • Then hit the Update Widget button to save your changes.
    • All States and Cities: How can I translate the field labels?  Image 1 Screenshot 20

    Additionally, go through this guide to inject CSS into the widget on the form.

    Give it a try and let us know if you need any help.