Should the variable type for language keywords be static or const? |
Hello everyone,
I'm designing a multilingual project, and I created a folder named Constants with a file called LanguageKeys.php inside it. The structure looks like this: PHP Code: namespace App\Constants; public static instead? These keys are saved to Redis from the database, and unless revalidation is done, the data is queried from Redis. Do you have any suggestions or thoughts on this?
KISS & DRY
Your repeating yourself. PHP Code: public array $supportedLocales = ['en', 'es', 'fr-FR']; Config files only uses strings for output. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |