I am trying to make a translation button for Romanian and I have tried to use RO, Romanian, ro-rRO and ro as code for Locale.RO
, but none seem to work. I have added a Romanian string translation xml, but this doesn't help. I have seen in a previous post that Romanian should should be supported even on older versions. There is also an answer recommending this command for this:
public Locale (String language, String country)
However, I have no idea where to implement this and if it would work. Can anyone help me to fix this?
An extract of the code that gives me the error can be found below:
Configuration config = new Configuration();
config.locale = Locale.RO;
getResources().updateConfiguration(config, getResources().getDisplayMetrics());