public static String localizeTarget(String xliffContent,String localizedTargetPrefix){
  return xliffContent.replaceAll("<target xml:lang=\"(.*?)\" state=\"(.*?)\">(.*?)</target>","<target xml:lang=\"$1\" state=\"$2\">" + localizedTargetPrefix + " - $3 $1</target>");
}

public static String localizeTarget ( String xliffContent , String localizedTargetPrefix ) { return xliffContent . replaceAll ( "<target xml:lang=\"(.*?)\" state=\"(.*?)\">(.*?)</target>" , "<target xml:lang=\"$1\" state=\"$2\">" + localizedTargetPrefix + " - $3 $1</target>" ) ; }
localizes an xliff file by replacing original targets by target where the content has been prepended with a prefix and the locale .
