Name

parse_locale —

ATTRIBUTES

Attribute Pos. Req. Default Description
interpolate     0 interpolate input?
reparse     1 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

parse_locale is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/parse_locale.coretag
Lines: 13


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: parse_locale.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $

UserTag parse_locale hasEndTag  
UserTag parse_locale PosNumber  0
UserTag parse_locale Version    $Revision: 1.4 $
UserTag parse_locale MapRoutine Vend::Util::parse_locale

Source: lib/Vend/Util.pm
Lines: 1134

sub parse_locale {
my ($input) = @_;

return if $::Pragma->{no_locale_parse};

# avoid copying big strings
my $r = ref($input) ? $input : \$input;

if($Vend::Cfg->{Locale}) {
  my $key;
  $$r =~ s~\[L(\s+([^\]]+))?\]((?s:.)*?)\[/L\]~
          $key = $2 || $3;    
          defined $Vend::Cfg->{Locale}{$key}
          ?  ($Vend::Cfg->{Locale}{$key})  : $3 ~eg;
  $$r =~ s~\[LC\]((?s:.)*?)\[/LC\]~
          find_locale_bit($1) ~eg;
  undef $Lang;
}
else {
  $$r =~ s~\[L(?:\s+[^\]]+)?\]((?s:.)*?)\[/L\]~$1~g;
}

# return scalar string if one get passed initially
return ref($input) ? $input : $$r;
}

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!