I am trying to find out how to create a language file for the blade files in my application, I have read through the relevant page of the docs, and it tells me everything except how to link in the file that contains the language definitions.
My 'search fu' is not helping (it's probably a bit early in the morning)
Would anyone be so kind as to point me in the right direction?
Laravel's localization features provide a convenient way to retrieve strings in various languages, allowing you to easily support multiple languages within your application. Language strings are stored in files within the resources/lang directory. Within this directory there should be a subdirectory for each language supported by the application:
/resources
/lang
/en
messages.php
/es
messages.php
All language files return an array of keyed strings. For example:
From this, you simply need to place the file in the correct file tree and you should be good to go. Based on your App:locale, it will automatically retrieve the key from the correct file, using the fallback locale where necessary.
In you config/app.php, modify the language in 'locale' => 'fr' (fr is for french in this example).
Then you have to create the fr folder in lang folder.
In this folder you can create any php file and then access it your blade template using the __
This file has to return an array.
Thank you @mushood I really appreciate you taking the time to answer :)
How curious, that's not exactly very clear (to me), no wonder I couldn't work it out - only one thing to do... I will try it :))))
The application I am building is quite large, so I would like to organise my text strings in different files, I guess it just automagically reads all the files in that directory. Really, I could do with finding the code that makes this work - I need to understand.