I am trying to prevent my app from automatically being translated to other languages (such as Bulgarian in my case). I want all of my strings to be in English. I tried setting the timezone to "Europe\London" (because I am in the UK) but that did not quite work. Is there a way how I can ensure that my app's settings (all of them) are not being translated when somebody install my app in other than the UK country?
I am using dates in my app and I am using SimpleDateFormatter
. I think this is causing the issue of translating some of the strings. So what I did is set the timezone to it as well before using the strings from it like that:
public static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"));
String time = sdf.format(new Date());
mPurchasedDate.setText(day + " " + numDay + " " + mont + " at " + time);
But that did not work either.
PS: I have not added any localization in my app. I have only one strings.xml
folder and the strings there are in English.
If you only want to use a specific Locale
for SimpleDateFormat
, use the constructor that takes a Locale
: new SimpleDateFormat(String, Locale):
public static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.UK);