zed 10 Posted March 23, 2023 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
Anders Melander 1653 Posted March 23, 2023 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