Hello :) I am using the latest Build which includes support for creating a RESX files. (example: MainPage.resx)
This compiles into the project's dll which is then packaged into the apk file. All works as it should for the default language. Unfortunately, I am hitting a wall when it comes to getting a non-default language to work. Here is what I have done... After creating my default resx file, I made a copy of it and named it MainPage.it-IT.resx. During the build process this will compile and create an it-IT folder with the Italian resources.dll file, as it does with any other Silverlight app. After inspecting the contents of the apk file, I found that this non-default language file is not being included, and as a result I cannot get the alternate languages to function. (which makes sense given that it is not being included in the apk file) I'm not sure if there is something obvious I am missing or if there is a bug. Please let me know what you think, Ant -----Original Message----- From: monodroid-boun...@lists.ximian.com [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Jonathan Pobst Sent: Monday, April 18, 2011 5:23 PM To: Discussions related to Mono for Android Cc: Anthony Ramirez Subject: Re: [mono-android] Resx Localization I verified that resx files work in Mono for Android, and added the VS template for the next version. Jonathan On 4/18/2011 9:47 AM, Anthony Ramirez wrote: > Hello :) > > Just wanted to follow up and see if anyone had any more > suggestions/comments before I posted as a bug. > > Thanks, > Ant > > > From: anthony.co...@live.com > > To: monodroid@lists.ximian.com > > Subject: Re: [mono-android] Resx Localization > Date: Wed, 13 Apr > 2011 17:22:13 -0400 > > Hmm... > > > > In preparation for posting this bug, I created a simple sample app > by > performing the following steps: > > 1 - Create a 'Mono for Android' project > 2 - Right-clicked on the > project and selected 'Add New Item' > > > > At this point, it became apparent that there is no way for me to > add a > 'Resources File' (.resx) file to my project. > > > > Previously, I was able to introduce the .resx file by copying and > pasting it > from a WP7 project into my 'Mono for Android' project. > > > > Ultimately, I want to have one shared method that can be used on my > WP7, > MonoTouch and Mono for Android projects. :) > > Am I > attacking this problem from the wrong angle? > > > > Thanks again for the help, > > Ant > > > > > > > > -----Original Message----- > > From: monodroid-boun...@lists.ximian.com > > [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Jonathan > Pryor > Sent: Wednesday, April 13, 2011 11:12 AM > To: Discussions > related to Mono for Android > Subject: Re: [mono-android] Resx > Localization > > On Apr 13, 2011, at 2:28 AM, Anthony.Coqui wrote: > > > For the last 3 hours, I've been trying to get localization > working with > resx files and cannot get the app to switch to another language. > > > > This _could_ be: > > > > https://bugzilla.novell.com/show_bug.cgi?id=664573 > > > > Specifically, the locale is cached at process startup, so if you > start your > process then change the locale, your app will continue > to use the locale > that was originally found. > > > > You should try exiting the process and restarting the app, see if > that fixes > things. > > > > You can exit the process on the emulator by using `adb shell kill > PID` (find > the PID via `adb shell ps` and look for your package > name). You can't > directly kill the process on devices, but for > Debug builds you can ask the > process to exit itself by: > > > > 1. Opening obj/Debug/android/AndroidManifest.xml > > 2. Look for the <receiver android:name="mono.android.Seppuku" /> > element; > nested within is an <action/> and <category/> element, e.g. > > > > <receiver android:name="mono.android.Seppuku"> > > <intent-filter> > > <action android:name="mono.android.intent.action.SEPPUKU" /> > > <category > > android:name="mono.android.intent.category.SEPPUKU.Mono.Samples.HelloTests" > > /> > > </intent-filter> > > </receiver> > > > > 3. Use `adb shell am broadcast -a ACTION -c CATEGORY`, e.g. > > > > $ adb shell am broadcast -a mono.android.intent.action.SEPPUKU \ > > -c > mono.android.intent.category.SEPPUKU.Mono.Samples.HelloTests > > > > > I checked the CultureInfo.CurrentCulture.EnglishName within the > app and it > returns the "non-English" culture, however, the > ResourceManager continues to > return the English language. > > > > Another possibility is that ResourceManager isn't finding an exact > match for > your "non-English" culture, and selects English as the > fallback culture, > thus resulting in english strings. > > > > > Is it even possible to do this? > > > > I would expect it to, but haven't actually tested it. :-) > > If > none of the above corrects the problem, could you please file a bug > > report and attach a solution that exhibits the problem? > > > > Thanks, > > - Jon > > > > _______________________________________________ > > Monodroid mailing list > > Monodroid@lists.ximian.com > > > > UNSUBSCRIBE INFORMATION: > > http://lists.ximian.com/mailman/listinfo/monodroid > > > > _______________________________________________ > > Monodroid mailing list > > Monodroid@lists.ximian.com > > > > UNSUBSCRIBE INFORMATION: > > http://lists.ximian.com/mailman/listinfo/monodroid > > > > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid