Name

LANG — contains the current locale for language (localization) display

SYNOPSIS

DESCRIPTION

This variable contains the current locale for language localization and display. The variable is not set in the configuration files, but is manipulated by the Interchange daemon while it is runnning.

If you want to define catalog default language, set the MV_LANG variable.

VARIABLE TYPE

Global variable,
Catalog variable

EXAMPLES

Example: Reading value of LANG

Add the following to a test Interchange page:

Currency: 

Example: Defining default language for a catalog

Put the following in catalog.cfg:

Variable MV_LANG fr_FR

NOTES

AVAILABILITY

LANG is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Dispatch.pm
Line 1714 (context shows lines 1704-1718 in dispatch():1266)

# LEGACY
ROUTINES: {
  last ROUTINES unless index($Vend::FinalPath, "/$Vend::Cfg->{ProcessPage}/") == 0;
  while ($Vend::FinalPath =~ s{/$Vend::Cfg->{ProcessPage}/(locale|language \
|currency)/([^/]*)/}{/$Vend::Cfg->{ProcessPage}/}) {
    $::Scratch->{"mv_$1"} = $2;
  }
  $Vend::FinalPath =~ s{/$Vend::Cfg->{ProcessPage}/page/}{/};
}

if(my $locale = $::Scratch->{mv_language}) {
  $Global::Variable->{LANG}
    = $::Variable->{LANG} = $locale;
}
# END LEGACY


Source: lib/Vend/Config.pm
Line 3306 (context shows lines 3296-3310 in parse_hash():3188)

  }
},

  Locale => sub {
#::logDebug("Doing Locale dispatch...");
      my $locale = $::Scratch->{mv_locale};
      my $curr = $::Scratch->{mv_currency};
      $locale || $curr    or return;

      if($locale and ! $::Scratch->{mv_language}) {
          $Global::Variable->{LANG}
                  = $::Variable->{LANG}
                  = $::Scratch->{mv_language}
                  = $locale;
      }

Source: lib/Vend/File.pm
Line 168 (context shows lines 158-172 in readfile_db():156)

return unless $Vend::Cfg->{FileDatabase};
my ($tab, $col) = split /:+/, $Vend::Cfg->{FileDatabase};
my $db = $Vend::Interpolate::Db{$tab} || ::database_exists_ref($tab)
  or return undef;
#::logDebug("tab=$tab exists, db=$db");

# I guess this is the best test
if($col) {
  return undef unless $db->column_exists($col);
}
elsif ( $col = $Global::Variable->{LANG} and $db->column_exists($col) ) {
  #do nothing
}
else {
  $col = 'default';

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!