• Resolved ohlordamen2

    (@ohlordamen2)


    Hi,
    I’m was/am working on getting the PDF to display Chinese. I couldn’t get your recommended Firefly font to work but I had another that I got working. Yours would display when I view it as html, but when saved to PDF I still got boxes.
    My problem now is when I change my site to be Chinese the $locale still is set to en_US, I added the outdated “define (‘WPLANG’, ‘zh_TW’);” to the config file. I’ve added “print apply_filters( ‘plugin_locale’, get_locale(), ‘wpo_wcpdf’ );” to the invoce.php and turned on the view as html code in the functions file to verify this. I even tried hard-coding it into the woocommerce-pdf-invoices-packingslips, changing the “function translations()” so it only looks only for zh_TW. I created the mo and po files (I’ll send them when I can verify all is working). But still says en_US. Any ideas?

    Thank You

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi there,
    I have no idea why this doesn’t work! I tried to reproduce this on my own system, but it worked for me!

    Here’s what I did:

    1. I downloaded the chinese language files from http://cn.wordpress.org/ and copied them to the wp-content/languages folder
    2. I went to Settings > General (设置 > 常规)
    3. Selected Chinese under Site Language (站点语言)
    4. Then used your code echo apply_filters( 'plugin_locale', get_locale(), 'wpo_wcpdf' );, which output zh_CN

    I can’t see why this would be different for zh_TW!

    If your code (in step 4) outputs en_US for you, then it doesn’t matter if you add the mo file, as it will not look for zh_TW in the first place…

    Thread Starter ohlordamen2

    (@ohlordamen2)

    So it turns out to be qTranslate that is causing the problem. Once I disable that plugin it works fine. For some reason, even though Chinese is selected as the default, qTranslate seems to override the database WPLANG entry and is always set to en_US.

    Any suggestions on a good multilanguage plugin, other than WPML?

    Awesome plugin you have made.

    Thank You.

    Plugin Contributor Ewout

    (@pomegranate)

    Hi there,
    Multilingual support for WooCommerce is quite difficult, and I think at the moment WPML is your best bet. You could also look at setting up a Multisite environment and then use Multilingual Press to link the products across the network. The advantage (or downside, depending on your needs) is that you can configure all woocommerce settings (currency, taxes, etc) for each site separately, and getting the right language to display is (supposedly) a whole lot easier. I have not used such a setup myself, but I have heard of other people successfully doing that.
    Another plugin to look out for is Babble, which will probably become the WordPress multilingual standard somewhere in the near future – the company behind it was acquired by Automattic, who own WordPress. But for now that’s not an option I’d recommend.

    Don’t forget to leave us a review here if you think the pdf plugin is awesome! 🙂

    Ewout

    Thread Starter ohlordamen2

    (@ohlordamen2)

    I’ll have to keep an eye out for Babble. Found a fork of the qTranslate plugin called mqTranslate, fixed my issues and is being updated. All works fine with my old setup.

    Thank You again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Chinese localization not working’ is closed to new replies.