Get array lang variables |
You could try using nested arrays inside of your language files, as seen here. You can then access the values like below.
Using the same example, let's assume you've got a file living inside of app/Language/en/Test.php: Code: return [ You can now access it like so: Code: return lang('Test.lang_array_1'); To get the values inside of the lang_array's. This may seem a little tedious but it does what you'd like it to. I have to agree on not using any require's and require_once's in your code and using the systems API instead as it's more consistent and full proof should anything change internally within the framework itself. I hope that this helps ![]() |
Messages In This Thread |
Get array lang variables - by mintwint - 01-17-2020, 01:51 PM
RE: Get array lang variables - by JNapolitanoIT - 01-17-2020, 05:53 PM
RE: Get array lang variables - by mintwint - 01-18-2020, 07:57 AM
RE: Get array lang variables - by littlej - 01-19-2020, 04:17 PM
RE: Get array lang variables - by mintwint - 01-20-2020, 01:19 PM
RE: Get array lang variables - by JNapolitanoIT - 01-20-2020, 01:58 PM
RE: Get array lang variables - by mintwint - 01-21-2020, 08:09 AM
RE: Get array lang variables - by JNapolitanoIT - 01-21-2020, 10:50 AM
|