[ic] Catalog v.s. admin: locale change

Stefan Hornburg racke at linuxia.de
Tue Jun 26 06:20:25 EDT 2007


Ton Verhagen wrote:
> Quoting Racke:
> At 09:36 PM 6/25/2007, you wrote:
>> Ton Verhagen wrote:
>>> Dear All,
>>> With every order we save the locale under which the
>>> order is placed. Doing so enables us to print the invoice
>>> (and packing list) in the customer's locale.
>>> Unfortunately one problem occurs:
>>> In the admin it seems not possible to change the locale on the fly.
>>> In other words the [setlocale] tag does not work....
>>
>> Unfortunately the UI has its own set of locales.
>>
>>> The only way getting the invoice and packing list print in the
>>> corresponding locale is to login with the locale set on the login page.
>>> What could we do in order to be able to print a bunch of invoices
>>> in one go, all with their own locale?
>>
>> The code switching to the "UI" locale is contained in [mm_locale].
>> You can probably figure out a way to keep the catalog locale by
>> passing a scratch variable on your print page and modify the 
>> [mm_locale] code slightly.
> 
> 
> Wouldn't it be better/simpler to add an option to the [mm_locale] tag?
> 
> E.g.
> 
> [mm_locale catalog=1]
>         or
> [mm_locale no_admin=1]
> 
> When catalog=1 (or no_admin=1) is set, the Locale repository of the
> catalog is used. Also the mv_shadowpass wouldn't be set in such case.

No, but modifying the .autoload file will do the trick.

[if global MV_PAGE eq admin/printfoo]
1
[else]
[mm_locale]
[/else]
[/if]

As [mm-locale] is a big kludge anyway, I don't like the idea of adding
parameters to it.

Regards
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list