tallhunter
IS-IT--Management
Hi,
I am trying to translate text strings into the PC's local language from english.
The mechanism works fine for straight string conversion using msgcat::mc, it correctly translates and converts the unicode to relevant characters.
However if I try to substitute strings using the format command with %s there is a problem. The problem is the characters are still encoded as unicode (e.g.\u00f6)
Can anyone point out the problem?
code snip:
if {[info exists ::msgcat::msgs($loc,$ns,$src)]} {
set temp $::msgcat::msgs($loc,$ns,$src)
if {[llength $args] == 0} {
return $::msgcat::msgs($loc,$ns,$src)
} else {
return [eval \
[list format $::msgcat::msgs($loc,$ns,$src)] \
$args]
}
}
Thanks
Paul
I am trying to translate text strings into the PC's local language from english.
The mechanism works fine for straight string conversion using msgcat::mc, it correctly translates and converts the unicode to relevant characters.
However if I try to substitute strings using the format command with %s there is a problem. The problem is the characters are still encoded as unicode (e.g.\u00f6)
Can anyone point out the problem?
code snip:
if {[info exists ::msgcat::msgs($loc,$ns,$src)]} {
set temp $::msgcat::msgs($loc,$ns,$src)
if {[llength $args] == 0} {
return $::msgcat::msgs($loc,$ns,$src)
} else {
return [eval \
[list format $::msgcat::msgs($loc,$ns,$src)] \
$args]
}
}
Thanks
Paul