1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: mm_locale.coretag,v 1.5 2007-03-30 23:40:54 pajamian Exp $
10 UserTag mm_locale Version $Revision: 1.5 $
11 UserTag mm_locale Routine <<EOR
13 my $locale = $Values->{ui_locale} || $Tag->var('UI_LOCALE', 2);
16 # tell Shadow database to return the unmangled database records
17 $Tag->tmp('mv_shadowpass', 1);
19 # first delete locale settings from catalog
20 $Vend::Cfg->{Locale_repository} = {};
22 if ($locale && exists $Global::Locale_repository->{$locale}) {
23 $lref = $Vend::Cfg->{Locale_repository}{"$locale"}
24 = $Global::Locale_repository->{$locale};
25 $Tag->setlocale("$locale");
26 $Tag->tmp('mv_locale', $locale);
27 if ($lref->{MV_LANG_DIRECTION}) {
28 $Tag->tmp('ui_language_direction', qq{ dir="$lref->{MV_LANG_DIRECTION}"});