CodeIgniter4 Language Localization - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: CodeIgniter4 Language Localization (/showthread.php?tid=74774) |
CodeIgniter4 Language Localization - code_writer - 11-04-2019 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 MyModule | |--controllers |-module_controller.php |--models |-module_model.php |--configs |-module_configs.php |--libraries |-module_libraries.php |--views |-view_1.php |-view_2.php |-view_3.php |--lang |-en-US |-userprofile.php 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 RE: CodeIgniter4 Language Localization - ciadmin - 11-04-2019 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. RE: CodeIgniter4 Language Localization - code_writer - 11-04-2019 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. |