Change locale inside ajax call
-
I posted this originally on wordpress.stackexchange but got no answer. The original post can be found here.
I am creating an invoice plugin for my own use, because I want to have all the invoices in one place. The github is here:
https://github.com/dingo-d/invoice-create-plugin
I have it working, except that I cannot select the language in which to save the pdf file.
The only way I got it working is either by changing the language of the WordPress backend in Settings, or by using the
locale
hookadd_filter( 'locale', 'mbd_change_locale', 10 ); function mbd_change_locale() { return 'hr_HR'; }
But this effectively does the same thing like changing the language.
I tried using
setlocale()
function inside the ajax callback function, but had no luck with it.Any help is welcome ??
- The topic ‘Change locale inside ajax call’ is closed to new replies.