Jump to content
Anders Melander

ANN: Better Translation Manager released

Recommended Posts

No, I mean what should I do in my Test.exe to make it possible to load translations from some subfolder? I don't like idea to keep this files in the application root folder.

Share this post


Link to post
7 hours ago, zed said:

No, I mean what should I do in my Test.exe to make it possible to load translations from some subfolder? I don't like idea to keep this files in the application root folder.

Ah, I see. No, that isn't really supported, but I can see how that would be beneficial. I've created an issue for it: https://bitbucket.org/anders_melander/better-translation-manager/issues/39

 

Assuming you are using BTMs resource module load functions (amLocalization.Utils unit), you will have to modify the following function in the amLanguageInfo unit:

function LoadNewResourceModule(LocaleItem: TLanguageItem; var ModuleFilename: string): HModule; overload;

For example, change this:

ModuleFilename := TPath.ChangeExtension(Filename, '.'+FileType);

...to this (note that this hard codes the sub-folder name):

var Folder := TPath.Combine(TPath.GetDirectoryName(Filename), '.\lang');
ModuleFilename := TPath.Combine(Folder, TPath.GetFileNameWithoutExtension(Filename)+'.'+FileType);

 

If you are using the RTLs built-in loading mechanism then there isn't any way I can think of.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×