LocaleDatabase — specify database that contains locale settings
Example: LocaleDatabase table structure
code en_US en_GB fr_FR de_DE nl_NL color color colour couleur Farbe kleur
Settings from LocaleDatabase
add on to (and override)
any that are already defined in the catalog configuration files through
the use of Locale
.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 4683 (context shows lines 4683-4733)
sub parse_configdb { my ($var, $value) = @_; my ($file, $type); return '' if ! $value; local($Vend::Cfg) = $C; my ($db, $table); eval { ($db, $table) = get_configdb($var, $value); }; ::logGlobal("$var $value: $@") if $@; return '' if ! $db; my ($k, @f); # key and fields my @l; # refs to locale repository my @n; # names of locales my @h; # names of locales my $base_direc = $var; $base_direc =~ s/Database$//; my $repos_name = $base_direc . '_repository'; my $repos = $C->{$repos_name} ||= {}; @n = $db->columns(); shift @n; my $i; if($Columnar{$base_direc}) { my @l; for(@n) { $repos->{$_} ||= {}; push @l, $repos->{$_}; } my $i; while( ($k , undef, @f ) = $db->each_record) { for ($i = 0; $i < @f; $i++) { next unless length($f[$i]); $l[$i]->{$k} = $f[$i]; } } } else { while( ($k, undef, @f ) = $db->each_record) { for ($i = 0; $i < @f; $i++) { next unless length($f[$i]); $repos->{$k}{$n[$i]} = $f[$i]; } } } $db->close_table(); return $table; }