• Resolved mprewitt

    (@mprewitt)


    I’m using Contact Form 7 with Polylang (with Contact Form 7 Polylang extension). Both are latest versions.

    I am getting thousands of errors exactly like these in my debug.log:

    
    CF7_2_POST: [401]./admin/class-cf7-polylang-admin.php
    + CF7 POLYLANG: Missing CF7 translation file for locale en_US
    + CF7 POLYLANG: Missing CF7 translation file for locale es_US
    

    For the “es_US” locale (Spanish as spoken in the U.S.), I followed the instructions at https://github.com/aurovrata/cf7-polylang and created a clone of the Mexican Spanish locale, and saved it as “contact-form-7-es_US.mo” in the /wp-content/plugins/contact-form-7/languages folder. But it doesn’t resolve the error.

    I’m also scratching my head over the missing “en_US” locale file, since that is U.S. English, which should be default, and in any case is not available anywhere that I’ve seen. The GitHub site seems to have UK English and Canadian English only.

    • This topic was modified 9 years, 6 months ago by mprewitt.
    • This topic was modified 9 years, 6 months ago by mprewitt.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    [EDIT]
    If you saw my previous msg, please ignore, I realised I fixed this already.

    That means that you have not named your translation files correctly, they should be in the form of

    contact-form-7-es_US.mo

    and placed in the correct folder,

    wp-content/plugins/cf7-polylang/languages/CF7

    I think you placed your files one folder above this one.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    PS: for the en_US my suggestion would be to copy and rename the en_CA or en_GB file to the en_US, and submit it to the translation api. Strange that it doesn’t exist for the default locale. I always use en_GB for my WP installations so I don’t see this error 🙁

    … and I realise also that the instructions in the FAQ section and on GitHub for saving the translation files are wrong, I mentioned the folder,

    wp-content/plugins/cf7-polylang/languages

    which should say

    wp-content/plugins/cf7-polylang/languages/CF7

    hence the reason you were misguided. My fault, sorry!

    Thread Starter mprewitt

    (@mprewitt)

    OK, will do. Looks like my file names were named as required, but just in the wrong folder.

    I’m not sure what is meant by “submit it to the translation api”. If you mean copy it to the /plugins/cf7-polylang/languages/CF7 folder, I can do that, but if you meant to submit it to the GitHub repository, I don’t know how to do that.

    PS: The FAQ page here on wordpress.org still has the old instructions (https://wordpress.org/plugins/cf7-polylang/faq/).

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Yes, I just updated it.

    ’m not sure what is meant by “submit it to the translation api”.

    I realise that makes not much sense since the default locale doesn’t need to be translated. I have removed the ‘en_US’ local from validation in the code, so this should not occur anymore.

    Thread Starter mprewitt

    (@mprewitt)

    Based on some reading I’ve done, it looks like the best place to tell users to store their custom .mo files is /wp-content/languages/plugins … because this folder won’t be overwritten when the user updates your plugin. Or maybe a subdirectory there, if that is a problem.

    This came up because I just updated the plugin to get the new behavior for en_US, but in the process it deleted my custom Spanish translation file as well.

    • This reply was modified 9 years, 6 months ago by mprewitt.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    oh nice, thanks for bringing this up. I will include this in the next udpate of the plugin!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Missing CF7 translation file’ is closed to new replies.