Josesoares Posted September 5 Share Posted September 5 I don't quite understand how to add translations to a module, and I am hoping you can shed some light on my confusion, for I may have misunderstood how it works. I read the information about overriding language at https://developers.whmcs.com/languages/overrides/, but I struggle with understanding the following: - when are the files in this override folder executed, is it run whenever you need to add new translations, or does it just sit there and is used on runtime? - the files do not seem to be specific for a given module (in example: whmcs/lang/overrides/english.php), so does that mean someone tries to install my module not realizing this, may end removing other module's translation when they replace the entire file? - in case there exists override files in "whmcs/lang/overrides/", is a user (owner/maintainer of any given WHMCS platform) expected to manually append the translations to the files that have the same name? In my case I already have a module (payment gateway) and would like to add translations to it. The WHMCS version is 8 and above. Any help is appreciated, thank you. 0 Quote Link to comment Share on other sites More sharing options...
DristiTechnologies Posted Saturday at 01:40 AM Share Posted Saturday at 01:40 AM For WHMCS modules (addon or gateway), you should not use the whmcs/lang/overrides/ folder. That folder is meant only for global WHMCS string overrides and must be manually maintained by the site owner, adding or replacing files there can accidentally overwrite other modules’ translations. Instead, each module should provide its own /lang/ folder inside the module directory: More details are here: WHMCS Addon Module Multi-Language 0 Quote Link to comment Share on other sites More sharing options...
Josesoares Posted Tuesday at 02:25 PM Author Share Posted Tuesday at 02:25 PM Thanks for confirming the first part. As for the second, given the link you shared, which seems to be for Module Addons, I don't know if that is compatible with payment gateways, at the very least I did try it with no success. Am I missing something? Could it be that even the native (third party) payment gateways are not translated or just use the global files? I can't look it up since everything is hashed for ion-cube. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.