The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Localized resource files
Posted: 11 Dec 07 8:02 AM
|
I have a .NET form that uses the localization features of the framework by separating certain localized strings into special resource files. When compiling the project, an assembly is generated for each non-default culture which is then placed into a subdirectory named by this culture (e.g. a subdirectory "de" with a file MyForm.resource.dll for German resources).
If I now add this form to the .NET Extension Manager of SalesLogix, the resource file is not included into the dependencies files (or into any other area) and it will not be copied to the client machine. This causes the form to always use the default localization. The only "solution" I could find by now is to create the subdirectory and copy the resource file manually to the client, which of course is not applicable. I also tried to add the file to the supporting materials and retrieve it directly from the database, but this did not work either.
Any ideas on how to make SLX install and synch localized resource files are appreciated.
Thanks Ingmar
|
|
|
|
Re: Localized resource files
Posted: 11 Dec 07 12:19 PM
|
You are able to add additional files to a .NET Extension and these files will get deployed with teh extension to the client machines as well. Add these resource files to the "Supporting Material" tab on the extension. Then they'll get copied out with the extension. The trick will be to get them in subdirectories when deployed - but I'll leave that to you to play with 
-Ryan |
|
|
|
Re: Localized resource files
Posted: 12 Dec 07 9:13 AM
|
Thanks, Ryan. But the problem is that the files I add to the "Supporting Materials" never get copied to the client machines (neither remote nor network). I can find their content in the database table NETFORMS_PLUGIN and I already tried to create a file from it, but this only worked for the admin user - and somehow it seems more like a dirty hack to me
The .NET Manager help says that the "Export" command can be used to copy a file to the client machine, but the only thing this does is to copy the file to a path on the server (which of course could be accessed by network users, but not by remotes). Am I missing something important?
Ingmar |
|
|
|
Re: Localized resource files
Posted: 12 Dec 07 10:07 AM
|
Hi Ingmar,
I've always understood that the supporting materials *did* get deployed out with the extension. Maybe I was wrong? If that's the case, I would do this: Take all your resource files, and embed them in the EXE (or create a dependent DLL to contain them). Then at runtime, the app could check if these existed and if not could pull them out and place in the needed directories. This would be a fast check to see if they were already there. I don't think it would slow down the loading of the extension at all. Maybe you could have two extensions. One that is a loader extension that runs when SLX starts and checks for the resource files and copies them if needed. Then the other wouldn't need to check anything.
Just an idea. That is probably what I would do. Hope that helps.
-Ryan |
|
|
|
Re: Localized resource files
Posted: 13 Dec 07 9:53 AM
|
Maybe if it is being such a pain, you could store the localization information in the database in its own table? |
|
|
|
Re: Localized resource files
Posted: 18 Dec 07 7:06 AM
|
I would suppose that you create your resource dll as required. Make sure that your .net extension assembly references the resource dll. The reason for this is you want .net extension manager to pick it up as a dependency so that it will get deployed out. If it follows the naming convention you should be fine. Depending on complex your extension is you could always embed XML language document and images into your assembly and just retrieve them yourself. Doing so would probably be a more optimal solution when it comes to performance.
Mark |
|
|
|