4 print header("View Message catalog", menubar(
6 'Edit message catalog' => $p. "edit/msgcat.cgi",
9 my $widget = new HTML::Widgets::SelectLayers(
10 'selected_layer' => 'en_US',
11 'options' => { 'en_US'=>'en_US' },
12 'layer_callback' => sub {
14 my $html = "<BR>Messages for locale $layer<BR>". table().
15 "<TR><TH COLSPAN=2>Code</TH>".
17 $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
20 #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
21 # qsearch('msgcat', { 'locale' => $layer } ) ) {
22 foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
23 $html .= '<TR><TD>'. $msgcat->msgnum. '</TD>'.
24 '<TD>'. $msgcat->msgcode. '</TD>'.
25 '<TD>'. $msgcat->msg. '</TD>';
26 unless ( $layer eq 'en_US' ) {
27 my $en_msgcat = qsearchs('msgcat', {
29 'msgcode' => $msgcat->msgcode,
31 $html .= '<TD>'. $en_msgcat->msg. '</TD>';