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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With