Support » Plugin: Woo Custom Stock Status » Plugin translation

  • Resolved edvardspektar

    (@edvardspektar)


    Hello,
    is there a way to translate plugin to another languages via WPML or something else?
    Thanks in advance, regards.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author softound

    (@softound)

    Yes, it is translatable.

    You can suggest translations for this plugin at https://translate.wordpress.org/projects/wp-plugins/woo-custom-stock-status/
    Read more about how we work with translations of WordPress and the free plugins and themes that are available here at wordpress.org in make.wordpress.org/polyglots/handbook/

    edvardspektar

    (@edvardspektar)

    Ok, thanks but can you tell me how to reach strings via WPML?
    I have my custom stock strings on Croatian language that are not showing inside WPML plugin or string translation.
    For example: Available on backorder -> Proizvod je u dolasku
    I have to translate this to another language.
    Thanks in advance, regards.

    If you in WPML have defined the locale code for Croatian as hr, then you should save your translation of this plugin in .mo format, name the file woo-custom-stock-status-hr.mo and upload it to /wp-content/languages/plugins/.

    If you use the “import” link on https://translate.wordpress.org/projects/wp-plugins/woo-custom-stock-status/stable/hr/default/ to upload your translation, then, as soon as it gets confirmed by one of the translation editors for #hr, your translation would get delivered to all users of this plugin that have Croatian as one of their languages in their installation. (Provided that at least 8 of the 9 strings get translated, the threshold for language pack creation is 90%.)

    edvardspektar

    (@edvardspektar)

    Ok, thanks. I know that but I am still having problem. Please be patient with me 🙂
    I can find the plugin in wpml and it has 4 strings to translate.
    I need to find my custom strings? Are they in stored in DB or?
    I cannot find them anywhere to translate all I can do now is to find and change them via custom function and get_locale regarding the language.

    So, I do not want to translate plugin admin strings just my custom strings I can not find.

    There are plugins that store various “string fixes” in the database. But the typical way to handle translation is file based, using .mo-files (which is a compiled version of the human-readable .po-file).

    The “key” is the source string, for _x() also combined with a context key.
    If the .po- and .mo-file don’t contain a complete match to the string you want to translate, then the string simply won’t be translated.

    Some plugin developers don’t update their .pot file every time they make a new release – some strings that are actually used in the plugin may not be present in the .pot file (if there is one). .po/.mo that are included with a plugin pretty often were built by someone some time ago and may lack various strings you might need. (I’m not sure, but I’d guess that untranslated strings are skipped when you build an .mo from a .po, too).

    The translation project at translate.wordpress.org may lack some strings, too. For instance, if there’s a directory /vendors in the plugin, it will not be scanned for translation function when a plugin was updated. And now and then the string import process may have failed for some reason.

    If you know exactly what string you need to translate, then you could add that string (and its translation) in the .po file using a text editor. Then use, say, poedit to compile a .mo file.

    edvardspektar

    (@edvardspektar)

    Ok thank you.
    I tought that I can find those custom strings somewhere via WPML.
    Because I did not want to change .po file everytime I change that custom string.
    For example if I put “Available for backorder in 10 days” and change to
    “…in 20 days” i have to change the string in .po file and translate it to Croatian?
    For me easy, for client not so.
    But if there is no other way.
    Thank you for your quick replays. With regards.

    Ah. That’s a different thing, which should involve some development.
    If the developer does things the right way, the string to translate here would be: ‘Available for backorder in %s days’ where %s would be “retro-fitted” into the translated string. This can be achieved using the printf() command.

    Actually, since the substituted variable is a count, the translation should use the _n() translation function instead, where the original string to translate would include both singular and plural ‘Available for backorder in %s day’ / ‘Available for backorder in %s days’ and a typical translation to a Slavic language would offer 3 versions: 1 (21, 31…); 2 (3, 4, 22, 23, 24…); 5 (-20, 25-30…)

    edvardspektar

    (@edvardspektar)

    Yes I know, I tought the plugin would be 100% WPML compatible by now because I found
    post from 2016 that with new release it would be.
    Plugin is good and i will continue to use it.
    Thanks,
    regards.

    Plugin Author softound

    (@softound)

    Hi,

    We have recently updated the plugin to support translatable, can you please try with WPML

    thanks

    Yes, I saw it and updated it but there are no strings to translate through WPML.
    It is all the same.
    WPML after scanning the plugin for strings returns 5 strings that are for plugin itself.
    I cannot find anywhere to translate my custom strings.
    Am I doing something wrong?
    Thanks.

    doyuk

    (@doyuk)

    Dear @edvardspektar,

    Open the “WPML> String translation” page.
    Click the “Translate texts in admin screens» “link at the bottom of the page.
    Select the relevant fields.
    https://monosnap.com/file/M5trGWjvfXSF96NfIjEZpz4lejPE4B

    best regards,
    Tahir

    edvardspektar

    (@edvardspektar)

    Thank you very much.
    I allready did that but no strings come out in string translation.
    I will have to deal with memory limits and max var inputs.
    Thanks again, with regards.

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