Jump to content

Change language in invoicepdf.tpl


Abra Fabra

Recommended Posts

Client language in profile = 'romanian';

in /templates/six/invoicepdf.tpl
Lang::trans('invoicesdatecreated') = "Data emiterii" //'romanian'

I need output invoicepdf.tpl in english, but not change client language.

Lang::setLocale('english');//Working, BUT not loading /lang/overrides/english.php
Lang::trans('invoicesdatecreated') = "Invoice Date" //english

Lang::setLocale('override_english');//NOT working
Lang::trans('invoicesdatecreated') = "Data emiterii" //'romanian'

How to set english locale with overrides, that Lang::trans('***') return english lang?

Not a nice solution
$language = \WHMCS\Language\ClientLanguage::factory(\WHMCS\Config\Setting::getValue("Language"), 'english', '', false);
$_LANG = $language->toArray();
And change Lang::trans('xxx') to $_LANG['xxx'] in in all places.

Please help)

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated