Lotus Ong Posted March 26, 2011 Share Posted March 26, 2011 How to change the PDF setting for the current language from English to Non English (Like Chinese Simplified) , Which type of encoding that we need to select ? The invoice can't show the non English text ? Link to comment Share on other sites More sharing options...
wqest Posted December 31, 2011 Share Posted December 31, 2011 Hi! I have exact same issue. PDF invoice and Back office is in English, Front office is translated (in my case Estonian) Ver 1.4.5.1 and custom theme. Help please! Link to comment Share on other sites More sharing options...
bellini13 Posted December 31, 2011 Share Posted December 31, 2011 the invoice should be created using the language of the person logged in and viewing it. you may need to create those translations in the Tools | Translations section of the back office. Under Modify translations section, choose PDF Translations and then click the appropriate flag to edit them. Link to comment Share on other sites More sharing options...
wqest Posted December 31, 2011 Share Posted December 31, 2011 Hi! Everything seems to be translated. Estonian language pack is 85 % translated. Not even a single row is missing under PDF and Back Office modify option. What is the prob? Help please Oh, and yeah.. Have fun tonight! Link to comment Share on other sites More sharing options...
bellini13 Posted December 31, 2011 Share Posted December 31, 2011 @wqest, when you are viewing the invoice, are you doing it from the front office or the back office? Link to comment Share on other sites More sharing options...
wqest Posted January 2, 2012 Share Posted January 2, 2012 @wqest, when you are viewing the invoice, are you doing it from the front office or the back office? From the back office. And if i make a test order as a client my invoice is also in English. Link to comment Share on other sites More sharing options...
bellini13 Posted January 2, 2012 Share Posted January 2, 2012 i had stated in my previous thread, that the invoice is always displayed in the language of the logged in user. since you said your back office default is english, then i would expect you to see the invoice in english. when you tested a client order from the front office, what language did you select? Link to comment Share on other sites More sharing options...
wqest Posted January 4, 2012 Share Posted January 4, 2012 when you tested a client order from the front office, what language did you select? Estonian. And Estonian is default language anyways... Link to comment Share on other sites More sharing options...
bellini13 Posted January 4, 2012 Share Posted January 4, 2012 ok, so the back office apparently is working properly, since the language is english, and the invoice is displaying in english, true? for the front office, did you ensure that the PDF Translations exists for that language? Also, when you made the purchase, was the language english or Estonian? the language is stored at the order level, so even though you have selected Estonian for the front office, it may be showing english if you checked out originally as english. Link to comment Share on other sites More sharing options...
wqest Posted January 4, 2012 Share Posted January 4, 2012 Well... here is my test page: -edit- Employee is able to view only. Link to comment Share on other sites More sharing options...
bellini13 Posted January 5, 2012 Share Posted January 5, 2012 i created an order but I cannot log into your backoffice using those credentials. can you update the order to payment accepted so that an invoice can be generated. Link to comment Share on other sites More sharing options...
wqest Posted January 5, 2012 Share Posted January 5, 2012 Payment accepted. New log in: -edit- Thanks in a billion, bellini Link to comment Share on other sites More sharing options...
bellini13 Posted January 5, 2012 Share Posted January 5, 2012 this worked appropriately for me. i will send you a PM with details Link to comment Share on other sites More sharing options...
wqest Posted January 6, 2012 Share Posted January 6, 2012 I just figured out thanks to you, bellini! Back office invoice created in that language which are chosen by employee. Back office -> Employee -> pick one -> set proper language. That's it in my case. Simple as that, but somehow it does not make any sense before. Sorry for my really bad English and THANK YOUUU!!! bellini13. Link to comment Share on other sites More sharing options...
EQ10000 Posted January 9, 2012 Share Posted January 9, 2012 In my case, as Chinese cannot be shown in the pdf, is it possible to set all pdf including from orders would be in English. thanks! Link to comment Share on other sites More sharing options...
bellini13 Posted January 9, 2012 Share Posted January 9, 2012 you would just need to override the PDF.php class so that it defaults to the english language Link to comment Share on other sites More sharing options...
EQ10000 Posted January 10, 2012 Share Posted January 10, 2012 Well, After two days hacking, if I got the right concept, I need to replace: self::l('INVOICE #') which 'L' is the core function to using the current language the user selected. I decided to just input English to pdf translation for all fields. Tools > Translation > modify translation > pdf translation : all fields use English. So, INVOICE# : 'Invoice #' If I got wrong, any recommendation would be welcome. Link to comment Share on other sites More sharing options...
EQ10000 Posted January 20, 2012 Share Posted January 20, 2012 Well, this is not the right way to fix as customer may input Chinese and the pdf would output ???? still. Please help to make tools/fpdf to support all UTF-8 lang. Link to comment Share on other sites More sharing options...
bellini13 Posted January 20, 2012 Share Posted January 20, 2012 PDF.php has a construct function, which looks at a cookie to determine the language to use. I would have just altered this function so it hardcodes to english. public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4') { global $cookie; if (!isset($cookie) OR !is_object($cookie)) $cookie->id_lang = (int)(Configuration::get('PS_LANG_DEFAULT')); self::$_iso = strtoupper(Language::getIsoById($cookie->id_lang)); FPDF::FPDF($orientation, $unit, $format); $this->_initPDFFonts(); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now