Defined in
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
-
No testcase defined.
Source code:
set obj [uplevel self]
if {![$obj exists __localizer]} {
$obj set __localizer [list]
}
if {[string first \x02 $text] == -1} {
return $text
} else {
set return_text ""
if {$inline} {
while { [regsub -all -- {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $text {\2\1\3} text] } {}
regsub -all -nocase -- {(<option\s[^>]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^<]*</option[^>]*>)} $text {\2\1\3} text
while { [regsub -all -nocase -- {(<select[^>]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)} $text {\2\1} text] } {}
}
while {[regexp {^([^\x02]*)\x02\(\x01([^\x01]*)\x01\)\x02(.*)$} $text _ before key text]} {
append return_text $before
lassign [split $key .] package_key message_key
set url [export_vars -base $::xo::acs_lang_url/edit-localized-message {
{locale {[ad_conn locale]} }
package_key message_key
{return_url [ad_return_url]}
}]
if {[lang::message::message_exists_p [ad_conn locale] $key]} {
set type localized
} elseif { [lang::message::message_exists_p "en_US" $key] } {
set type us_only
} else {
set url [export_vars -base $::xo::acs_lang_url/localized-message-new {
{locale en_US } package_key message_key
{return_url [ad_return_url]}
}]
set type missing
}
if {!$inline} {
$obj lappend __localizer [::xo::Localizer new -type $type -key $key -url $url]
} else {
set l [::xo::Localizer new -type $type -key $key -url $url]
append return_text [$l asHTML]
}
}
append return_text $text
return $return_text
}
XQL Not present:Generic, PostgreSQL, Oracle