Support » Plugin: Gift Cards (Gift Vouchers and Packages) (WooCommerce Supported) » problem with localisation to Czech language

  • Hello,

    I had a problem with localisation of pluginn to Czech language. T have translated frontend of plugin, but when user wrote some special characters (like ěščřžýáíéůĚŠČŘŽÝÁÍÉŮ) to fields for name, or personal message, this value disapeared from final PDF-version of voucher.
    I have discovered that it can be caused by used library for PDF conversion (FPDF), this is a little obsolete one and it has no support for UTF-8 encoding and in Your plugin is used cp1252 encoding.
    So, I do not have any idea how to change encoding of core fonts, due to this I have created font Calibri with encoding ISO-8859-2 (central european). I had to change function wpgv_em()

    gift-voucher.php - line 512
    function wpgv_em($word) 
        $word = stripslashes($word);
        //$word = iconv('UTF-8', 'windows-1252', $word);
        $word = iconv('UTF-8', 'ISO-8859-2', $word);
        return $word;

    … and finally I had to change style1.php … style3.php, at beginning og the files I have loaded the font Calibri, and I have replaced ‘Arial’ by ‘Calibri’.

    // PDF Style 1
    $pdf = new WPGV_PDF('P','pt',array(595,900));
    $pdf->Image($image, 0, 0, 595, 453);

    Yes, this is not a world-wide solution, but You can think about better solution.

    The plugin is working now according to our needs, we do not need help, but it would be nice if this will be solved in next release.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘problem with localisation to Czech language’ is closed to new replies.