Change plugin locale
-
I’m trying to change the local of the packingslip PDF so that it matches the website language instead of the user language. I see that inside the function
translations()
there is a filter forplugin_locale
but i’m unable to get it to work.This is where i’m stuck at:
add_filter('plugin_locale', 'custom_plugin_locale', 10, 2); function custom_plugin_locale($locale, $textdomain) { if($textdomain == 'woocommerce-pdf-invoices-packing-slips'): $locale = 'de_DE'; endif; return $locale; }
Could you please provide assistance, or even better a working example, on how to get it to work?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Change plugin locale’ is closed to new replies.