Page 25 of 84
Re: My last screenshot...
Posted: 10 Aug 2017, 15:15
by Lobby
Re: My last screenshot...
Posted: 10 Aug 2017, 15:16
by Josh
WoW

all languages
Re: My last screenshot...
Posted: 10 Aug 2017, 15:17
by Josh
I am going to play in Russiannnnnn!!!!!
Re: My last screenshot...
Posted: 10 Aug 2017, 15:21
by Lobby
Changing the language has to do with hacking behind the scenes. But I got so much requests for this feature that I think it is worth it

Re: My last screenshot...
Posted: 10 Aug 2017, 15:48
by BetterBear
Lobby wrote: ↑10 Aug 2017, 15:15
2017-08-10 15.08.34.png
Now Im gonna see all your horrible and unfinished translations

Re: My last screenshot...
Posted: 10 Aug 2017, 21:45
by waders
Zone for the rich
Re: My last screenshot...
Posted: 10 Aug 2017, 21:47
by CommanderABab
Nice!
Re: My last screenshot...
Posted: 11 Aug 2017, 05:33
by Bearbear76
Lobby wrote: ↑10 Aug 2017, 15:21
Changing the language has to do with hacking behind the scenes. But I got so much requests for this feature that I think it is worth it
How did you do it I'm curious
Re: My last screenshot...
Posted: 11 Aug 2017, 10:45
by BetterBear
He's the dev, he knows everything.
Re: My last screenshot...
Posted: 11 Aug 2017, 11:11
by Lobby
I can only change the language for resources for a short time. So I change the language, copy all the translated strings into an own data structure and use this one to resolve translation requests in the future. It has a bit of overhead, but it will only be used if user set another language manually.
Code wise the important part looks like
Code: Select all
Resources resources = context.getResources();
DisplayMetrics dm = resources.getDisplayMetrics();
Configuration configuration = resources.getConfiguration();
Configuration newConfig = new Configuration(configuration);
newConfig.locale = locale;
Resources res = new Resources(resources.getAssets(), dm, newConfig);
try {
Field[] fields = R.string.class.getDeclaredFields();
idToString = new SparseArray<>();
for (int i = 0; i < fields.length; i++) {
int id = (Integer) fields[i].get(null);
idToString.put(id, res.getString(id));
}
} catch (IllegalAccessException e) {
idToString = null;
}
resources.updateConfiguration(configuration, dm);
and isn't nice by any means. E.g. it uses reflection to get access on all translation ids which are stored as static fields in the R.string class.
Re: My last screenshot...
Posted: 11 Aug 2017, 12:06
by Bearbear76
Re: My last screenshot...
Posted: 11 Aug 2017, 13:17
by BetterBear
Did anyone else lost their option to build runways? I lost it, but with some of them I kept I saw they are flashing now. Beautiful!
Re: My last screenshot...
Posted: 11 Aug 2017, 13:21
by Bearbear76
I dare someone to make a perfect Y junction in theotown

Re: My last screenshot...
Posted: 11 Aug 2017, 14:02
by Bearbear76
7/10
Re: My last screenshot...
Posted: 11 Aug 2017, 14:06
by malsa
9/10
Re: My last screenshot...
Posted: 11 Aug 2017, 14:06
by BetterBear
BetterBear wrote: ↑11 Aug 2017, 13:17
Did anyone else lost their option to build runways? I lost it, but with some of them I kept I saw they are flashing now. Beautiful!
Anyone wants a pic?
Re: My last screenshot...
Posted: 11 Aug 2017, 15:06
by Bearbear76
Ok
Re: My last screenshot...
Posted: 11 Aug 2017, 20:12
by Josh
IGN 11/10
Re: My last screenshot...
Posted: 12 Aug 2017, 11:19
by CommanderABab
Re: My last screenshot...
Posted: 12 Aug 2017, 13:22
by Bearbear76
Lol
