public String findInterlanguageLink(String lang){
  int start=page.indexOf("[[" + lang + ":");
  if (start < 0)   return null;
  int end=page.indexOf("]]",start);
  if (end < 0)   return null;
  String link=page.substring(start + 3 + lang.length(),end);
  if (link.indexOf("\n") != -1) {
    return null;
  }
  if (link.length() == 0)   return null;
  return link;
}

public String findInterlanguageLink ( String lang ) { int start = page . indexOf ( "[[" + lang + ":" ) ; if ( start < 0 ) return null ; int end = page . indexOf ( "]]" , start ) ; if ( end < 0 ) return null ; String link = page . substring ( start + 3 + lang . length ( ) , end ) ; if ( link . indexOf ( "\n" ) != - 1 ) { return null ; } if ( link . length ( ) == 0 ) return null ; return link ; }
returns the inter - language link to a specific language ( if any ) .
