News:

Support the VirtueMart project and become a member

Main Menu

Language bug? Shipment, payment not change language when I change language in J5

Started by kovacshazi, Yesterday at 10:18:36 AM

Previous topic - Next topic

kovacshazi

Joomla 5.4.1 VirtueMart 4.6.6
It seems as if VirtueMart only uses Joomla's default language tables. Everything else switches languages fine, but not VirtueMart.
I see this in the debug message too:

1 vmdebug 2 Languages, default joomla language $jDefLang): hu_hu hu-HU
Selected VM language (VmConfig::$vmlang): hu_hu hu-HU SEF: hu $lfbs =
This may be OK, as these are the default languages, although the VM language should probably be English.
--------------------
5 vmdebug Set router vars self::$get, Post, self::$request Var0:
Var2:
Array
(
    [language] => en-GB
    [option] => com_virtuemart
    [view] => category
    [virtuemart_category_id] => 37
    [virtuemart_manufacturer_id] => 0
    [Itemid] => 860
)
This is good for the English language
--------------------
21 vmdebug exeSortSearchListQuery my $limitStart 12 $limit 12 q Var0:

SELECT SQL_CALC_FOUND_ROWS  p.virtuemart_product_id
        FROM kk2025_virtuemart_products as p
 INNER JOIN kk2025_virtuemart_products_hu_hu as l ON l.virtuemart_product_id = p.virtuemart_product_id
 LEFT JOIN kk2025_virtuemart_product_shoppergroups as ps ON p.virtuemart_product_id = ps.virtuemart_product_id
 LEFT JOIN kk2025_virtuemart_product_categories as pc ON p.virtuemart_product_id = pc.virtuemart_product_id
 WHERE ( pc.virtuemart_category_id IN (37)  AND  ( ps.virtuemart_shoppergroup_id= "1"  OR ps.virtuemart_shoppergroup_id IS NULL  )  AND  p.published="1" )
 group by p.virtuemart_product_id
 ORDER BY p.product_available_date DESC, p.virtuemart_product_id DESC LIMIT 12, 12

However, this is not acceptable because the query now contains hu_hu instead of en_gb.

What could be the problem? Joomla or VirtueMart? I think it's VM, because everything else on the site is in English when I switch to English.

stAn99

the issue with language is most commonly cuased by any system plugin loading vmconfig "before onafterroute" event (i.e. before languag filter plugin sets the language)

to see which plugin does it you might want to put:

$x = debug_backtrace();
foreach ($x as $l) echo $l['file'].' '.$l['line']."<br />\n";
die(__FILE__.'@'.__LINE__);


within /administrator/components/com_virtuemart/helpers/config.php

(at the top after <?php )

this will show you bakctrace of which plugin had loaded it too early - disable the plugin and test it further

----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart