+sub tweakbestlink ($$) { #{{{
+ my %params = @_;
+ my $page=$params{page};
+ my $link=$params{link};
+ if ($config{po_link_to} eq "current" && pagespec_match($link, "istranslatable()")) {
+ if (pagespec_match($page, "istranslation()")) {
+ my ($masterpage, $curlang) = ($page =~ /(.*)[.]([a-z]{2})$/);
+ return $link . "." . $curlang;
+ }
+ }
+ return $link;
+} #}}}
+