• Resolved Soul

    (@soulkitchen)


    Hi Woo,

    couldn’t find any translation option for the following string: ‘Select a state/county’ anywhere. neither woo translate nor wordpress. Might be outside the wire 🙂

    It looks weird in Turkish and customers will say that my Turkish isn’t correct. 🙂

    how can I change this string to my desired needs? (I asked chatgpt but I think I broke it. 🙂 )

    It shows ‘şehir öğesini seçin’ should be ‘Şehir seçin’

    Can you put this in the plugins pot file?

    And is it possible to replace it or translate the original into the right one with functions snipped ?

    Thank YOU to have woocommerce. 🙂

    Best regards
    Soul

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    I can understand that you are facing issue while translating the Select a state/county string in turkish. To resolve the translation issue with “Select a state/county” in Turkish, I recommend using the Loco Translate plugin. This plugin provides an easy way to manage and edit translations directly within your WordPress dashboard.
    For more details you can use this guide.
    https://woocommerce.com/document/woocommerce-localization/#creating-custom-translations

    I hope this helps.

    Thread Starter Soul

    (@soulkitchen)

    thanks for the quick reply, unfortunately there is no string in pot for select a state/county

    so if I make a custom translate file I’ll not find the string. Am I wrong?

    BR

    Soul

    Hi @soulkitchen ,

    Thanks so much for getting back to us.

    If you’re not seeing the string in Loco Translate, that usually means it’s not included in the theme or plugin’s POT file — which can definitely be confusing when you’re trying to make a simple text change.

    In cases like this, a really handy workaround is using the Say What? plugin. It’s a lightweight tool that lets you change or translate specific text strings on your site without needing to dive into .PO files or modify theme code.

    You can find a step-by-step guide on how to use it here: https://woocommerce.com/document/woocommerce-localization/#translating-text-without-a-localization-file

    I hope this helps!

    Thread Starter Soul

    (@soulkitchen)

    Hi @jonayedhosen

    I will give a try but on FAQ’s the first question say’s like below. 🙂

    Can I use it to change any string?

    You can only use the plugin to translate strings which are marked for translation.

    Let’s have a try.

    Thanks

    Hi @soulkitchen,

    You’ve raised a great point, and you’re absolutely right, the Say What? plugin only works for strings that are properly marked for translation using functions like __() or _e(). If the “Select a state/county” string isn’t set up that way in the code, Say What? won’t be able to catch it.

    If Say What? doesn’t detect the string, a solid alternative is to use the gettext filter in your theme’s functions.php file to manually override the output. Here’s a snippet you can try:

    add_filter( 'gettext', 'custom_rename_state_label', 20, 3 );
    function custom_rename_state_label( $translated_text, $text, $domain ) {
        if ( 'Select a state/county' === $text ) {
            $translated_text = 'Şehir seçin';
        }
        return $translated_text;
    }

    This method replaces the string site-wide, even if it’s not included in the .pot file.

    If you’d like to explore more about localization and translation options in WooCommerce, here are some helpful guides:

    Give that a try and let us know how it goes.

    Thread Starter Soul

    (@soulkitchen)

    Hi @lovingbro

    thanks for the snippet. I appreciate it much. but… 🙂

    Not working. I didn’t find the string either inside the wocommerce folder nor in wordpress.

    I’ve searched with visual studio code. No string called ‘Select a state/county’ 🙂

    Ghost in the shell appears here as well. Long live Scarlet. 🙂

    Best regards

    soul

    Hi @soulkitchen,

    Could you please share a link to your checkout page so I can inspect the specific field displaying this text? Some strings are loaded via JavaScript, which can make them harder to locate. Also, have you tried searching for the string using Loco Translate plugin? As it was suggested but you didn’t confirm if you’ve tried it.

    Let me know—I’m here to help.

    Thread Starter Soul

    (@soulkitchen)

    Hi @mosesmedh

    Sorry if I did not mentioned. Loco was not able to find the string either.

    The checkout link,

    https://tr.boojaro.com/odeme

    I think you are right regarding loading via java script.

    BR

    Soul

    Hi @soulkitchen ,

    I’m sorry to hear the snippet isn’t working well with your setup — I know how tricky that can be.

    One tool that might help you track down the source of the string is the String Locator plugin. It lets you search through your site’s files to find exactly where a specific piece of text is coming from.

    Also, just checking — were you able to try the Say What? plugin I mentioned earlier? It’s a helpful way to change or translate specific text without needing to edit any theme files.

    You can follow this guide if you’d like to give it a try: WooCommerce Localization – Translating text without a localization file.

    Please note that our support is limited to the core WooCommerce plugin, and we’re unable to assist with modifications involving custom code or third-party plugins.

    For more advanced customizations, I’d recommend reaching out to Codeable or a Certified WooExpert, who can help tailor the solution to your site.

    Let us know how it goes!

    Thread Starter Soul

    (@soulkitchen)

    hi @jonayedhosen

    thanks for your suggestion.

    String locator seems to be a plugin that has potential for must have plugin list. Thank you.

    the Say what didn’t find anything bcs the string is not marked as translatable.

    so like @mosesmedh said it is a JavaScript load and therefor not discoverable. 🙂

    Any way. If you have a update on the plugin please put in a nicer translation for Turkish.

    Thanks all for your suggestion and help. I appreciate it much.

    Best Regards

    soul

    Hi @soulkitchen,

    Thanks for the effort you’ve put in so far and for the clarification, I understand this can be getting overwhelming and frustrating already.

    I just reviewed your checkout page and inspected the elements — I can see the exact field you’re referring to. That particular field should be available for translation. Could you try searching for “şehir öğesini seçin” instead of “Select a state/county” in Loco Translate and let me know if it shows up? You can also try the “Say What” plugin again as explained here: https://woocommerce.com/document/woocommerce-localization/#translating-text-without-a-localization-file

    Thread Starter Soul

    (@soulkitchen)

    Hello at all.

    All your suggestions are great. Unfortunately all of them didin’t work. Some ideas with String locator and Say What are good. Didin’t find any of the string. 🙁

    To clear that those string doesn’t exist I asked ChatGPT again and uploaded two zips for analize them. Below you will read the answer of ChatGPT. My last hope ChatGPT. 🙂
    Here we go:

    ——————–

    The Question:

    I have uploaded two ZIP folders. Woocommerce and WordPress lates version. I’m trying to locate the phrase:

    • “Select a state/county”
    • and its Turkish equivalent: “şehir öğesi seçin”

    I would like to know which file this phrase appears in and the exact line number if possible.

    If the phrase appears in both English and Turkish, I would like to identify each instance.
    Please let me know where it can be found.

    Thank you!

    ——————–

    The Answer:

    Both ZIP folders were successfully extracted:

    • woocommerce.zip contains 4,754 files
    • wordpress-6.8.1.zip contains 3,229 files

    I then searched within these files for the phrases:

    • “Select a state/county”
    • “şehir öğesi seçin” (Turkish translation)

    I aimed to identify the file names and line numbers where these phrases appear.

    Interestingly, neither phrase was found in any of the 7,983 files.

    Here are a few possible reasons for this:

    • The text might be generated dynamically via JavaScript and not stored as a static string.
    • It may exist within translation files such as .mo, which are in binary format and require special parsing.
    • The phrase could be written differently (e.g., “Select a state or county” instead of “Select a state/county”).

    If needed, I can perform a targeted scan of .po and .mo translation files or search for alternative variants of the phrase.

    Could you clarify whether this phrase appears in a form field, dropdown, button label, or placeholder text?
    ———–
    That’s all. 🙂
    PS: Im using the block editor checkout. All theme plugins up to date. Activate the compatible mod insinde Woo settings. No beta activated.

    Best regards
    Soul.

    PS 2: @mosesmedh I did all the suggestion. If you think that this string is translatable can you share your search for the string with Say What and String locator so may I will find it. (But even ChatGPT couldn’t find.) 🙂

    Hi @soulkitchen,

    Thank you for all the troubleshooting! It’s great to see you put so much effort into it. Actually, the correct string is ‘State/County’. Can you please try searching for this string and let us know what you find?

    FYI, I was able to successfully find the string using both Loco Translate and String Locator plugins: https://snipboard.io/WOZ7YB.jpg

    Thread Starter Soul

    (@soulkitchen)

    Hi @mahfuzurwp, thanks for your nice words.

    this was my second attempt to search after I didnt find the whole string. You’re right if searched only for State/County. And its starting with capital letters. My idea was maybe it taking parts of the words together and shows in the field. i.e. Select = seç a = ögesi and state/county = şehir. But no success on that either.

    What Im loocking for is sehir öğesini seç. And that dont appears no where.

    🙂

    Thread Starter Soul

    (@soulkitchen)

    PS: I changed to classic checkout. Thank you all for your assistance. I appreciate it much.

    Best regards.

    Soul

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘Select a state/county Translation’ is closed to new replies.