Older suggestion for translating language particles in the router.php

Started by man.of.earth, December 13, 2022, 01:08:51 AM

Previous topic - Next topic

man.of.earth

Hello developers,

Some time ago (I think I already posted about two years ago), I found a way to translate additional parts of the links, in the router, such as "number" and "id";

In the latest VM version I just installed (4.0.10 10767), the modifications are in the following lines:

line 695:
to replace
$segments[] = 'number/'.$query['order_number'];
for
$segments[] = $helper->lang('number').'/'.$query['order_number'];

line 698:
to replace
$segments[] = 'id/'.$query['virtuemart_order_id'];
for
$segments[] = $helper->lang('id').'/'.$query['virtuemart_order_id'];

line 917:
to replace
if ($segments[0] =='number')
for
if ($segments[0] == $helper->lang('number'))


In order for these definitions to be translatable, a number of string must be also added in the en-GB.com_virtuemart.sef.ini file:
COM_VIRTUEMART_SEF_ID="id_traslated"
COM_VIRTUEMART_SEF_NUMBER="number_translated"


Some time ago, I also found other strings that could be translatedback then (I'm not sure about them now, as I had no time yet to test):
COM_VIRTUEMART_SEF_EDIT="my_account_translated"
COM_VIRTUEMART_SEF_EDIT_ADDRESS="edit_address_translated"
COM_VIRTUEMART_SEF_ADDST="add_extra_shipping_address__translated"
COM_VIRTUEMART_SEF_REMOVEADDRESSST="delete_extra_shipping_address__translated"
COM_VIRTUEMART_SEF_ORDERDONE="order_sent__translated"


Maybe there are other ones too, which I haven't discovered yet.

Please, if you could add these, it would be excellent, as I have to do these modifications every time I update VM, which is time consuming and require a lot of attention/energy. Also, there are older links generated with this parts translated, that require being valid.

(The forum css, font size for the code: it could use being made a bit larger, as it is barely visible.)