Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String GetPurePercentString(double percent) { if ("zh".equals(Locale.getDefault().getLanguage())) return " " + String.format("%.2f", percent) + "%"; else return " " + String.format("%.2f", percent) + "%"; } public static String GetLanguage() { return Locale.getDefault().getLanguage(); } }