Abra Fabra Posted February 24, 2023 Share Posted February 24, 2023 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) 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.