Dotfuscator removing Windows Phone 7 language support?
Asked Answered
V

1

8

The XNA game that I am working on for WP7 supports multiple languages. However, something seems to be happening during the obfuscation process which seems to cause the language to always be set to English (the default language, in this case), at least according to the Resource class.

For example, each resource pack contains the following definition:

RESOURCE_IDX  ->  #

And each resource pack is given a different #. In an un-obfuscated build, the correct index is pulled out based on the device's current language. However once obfuscation occurs, the Resource class automatically selects the value associated with English even if the device is set to Spanish.

Is there a setting that I'm missing in the obfuscation process that is causing this?

Victorious answered 9/8, 2011 at 17:9 Comment(0)
V
1

It would appear that my issue was related to the renaming of the Resource class. That class is simply a set of auto-generated getters based on the contents of the resource packs. Somehow, subjecting that class to renaming during obfuscation caused the improper value to be returned (I won't speculate on why).

Once I prevented that class from being renamed, the rest of the application worked as expected.

Victorious answered 24/8, 2011 at 19:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.