How to 'manually' load translations/test domain outside theme context?
So I need to build a pdf file starting from a php/html template (currently using mpdf library). So my-pdf-template.php
file will never be shown on the website frontend, and sits on the main theme's folder.
It gets loaded at some point by mpdf and used as a template to format the resulting pdf.
To use wp functions on that template I'm currently importing wp-blog-header.php
, and all goes fine, except l10n functions (_e
, __
) do not work. No errors, but simply they don't find the context's translations (OR, they think it's not another language, so show the default).
How to make them available even here? Or, let them believe the current language is another from the default one?
Topic l10n translation Wordpress
Category Web