• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter4 Language Localization

I am creating a CI4 app with standalone modules. I want a scenario where a module is independent from another module and it can have its own resources as outlined in the structure below








or you can see the attachment which shows the directory structure of the module

I know with CI4 the default language files will be in the directory "Language/en-US/userprofile.php".
My question is, "How do I get the system to work with custom path for language files". In the scenario above, my language files will reside in a module directory as "MyModule/lang/en-US/userprofile.php" .

Thank you in advance

IIRC, CI4 will load translation sets form locales inside the Language subfolders of all the PSR-4 namespaces.
What are you are looking for is a bit different, and would be a feature request, I think.

Thank you @ciadmin. Yes I agree that can work as a future request so that we mantain the modular structure of the app in a decoupled manner.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.