This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi One thing that would be nice to use is something like this: Do you support some sort of satellite localization assembly scanning functionality that looks in the apps bin folder for some naming pattern inside various culture specific folders? Something a la:
Regards, |
|
|
Hi A.H., Hmm, yes, that sample doesn't seem particularly informative. Here's some more info. You need to do what the sample does in terms of building resources. That is, for each language/culture, you want to have a .resx file, to build it into a Mindscape.LightSpeed.resources.dll and to copy that DLL into an appropriately named subfolder of your output directory. You can adapt BuildResources.cmd from the sample to do this. Thus, you will end up with a Debug or Release folder containing your EXE file (and the main LightSpeed DLL, and anything else that you import). Underneath that Debug or Release folder, you will have a da-DK folder containing a Mindscape.LightSpeed.resources.dll file built from the Danish resources, a fo-FO folder containing a Mindscape.LightSpeed.resources.dll file built from the Faroese resources, etc.: bin\Debug\MyApp.exe Now if there is an appropriate folder for the current thread culture, it will automatically get picked up. Here's my test program: Thread.CurrentThread.CurrentCulture When I run this, having created a fr-FR subfolder and built a suitably Gallic MustBeBetween resource into my satellite resource DLL, I get my localised message in the output. Note that there is no need to explicitly load a resource manager. Hope this makes a bit more sense now! Please let us know if you need any more info. |
|
|
Hi Ivan A.H. Johannessen |
|
|
Ivan, I even tried to modify the Localization sample that comes with LS. A.H. Johannessen |
|
|
Hi Ivan, |
|
|
Hi A.H., I'm glad that's resolved for you, though I'm still a bit puzzled as to why it wasn't working for you in the satellite DLL case. If you can provide us with your test project -- you can attach a zip file via the options tab or email via the contact form (please remove all binaries first) -- then I'd be glad to look at it for you, which would remove the need for you to maintain your own copy of the code. |
|
|
Hi Ivan, Any news on this subject? I'm desperately trying to translate the standard error messages to dutch (nl-NL) using a satellite assembly. No luck. Regards, Diego |
|
|
Hi Ivan, I think I know what the problem is. The name of the resources in Mindscape.LightSpeed.dll is "..resources" (strange name, discovered that using Red Gate's .NET reflector) , not "Mindscape.LightSpeed.Properties.Resources.resources" as suggested in the localization sample. Am I missing something here? Diego |
|
|
I think you're right. I've reproduced the problem, and after changing the obfuscation settings to leave the resources un-obfuscated the problem appears to be solved. I've committed this change and it will be included in nightly builds dated 26 Mar 2010 and above, available from about 1500 GMT. Let us know if you still see problems after downloading this nightly. Thanks for drawing our attention to this! |
|
|
Hi Ivan, Works like a charm now. Thanks for the swift reply. Regards, Diego |
|