%perl> my $langs = $dbh->selectall_arrayref("SELECT tag,realname FROM languages WHERE langid>0 ORDER BY tag"); my @langs = map { $_->[0] } @{ $langs }; my %mapping = map { $_->[0] => $_->[1] } @{ $langs }; my @langshtml; my $format = '%s'; foreach my $curlang (@langs) { if($lang eq $curlang) { push @langshtml, $curlang; next; } my $vislang = $curlang; $vislang =~ s/\s+/ /g; my $html = sprintf($format, &utils::armorurl($curlang), ( $bg ? ";bg=$bg" : "" ), $vislang); push @langshtml, $html; } $titlestr = $mapping{$lang}; %perl> Word listings for "<% $mapping{$lang} %>" % # If using bestguesses % if( $bg ) % {
This is a "best guess" listing, meaning that selecting a word will show only the valsi and place which is currently considered the best guess as to what corresponds to that natural language word. The best guess is determined by compiling user votes.
As a side effect, only words that have votes registered will be shown here.
% }
% my $thiscolcount=$percolumn;
% while($listingquery->{Active} && defined(my $listingrow = $listingquery->fetchrow_hashref)) {
% my $bgstring = $bg ? "?bg=1;wordidarg=$listingrow->{'wordid'}" : "";
- <% $listingrow->{'word'} %> % last unless --$thiscolcount; % } |
% }