Download the PHP package trinityrank/multilanguage without Composer
On this page you can find all versions of the php package trinityrank/multilanguage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trinityrank/multilanguage
More information about trinityrank/multilanguage
Files in trinityrank/multilanguage
Package multilanguage
Short Description Add alternate multilanguage tags for same pages but on other language
License MIT
Homepage https://github.com/trinity-rank/multilanguage
Informations about the package multilanguage
Very short description of the package
Add alternate multilanguage tags for same pages but on other language.
Installation
Step 1: Install package
To get started with Laravel Multilanguage, use Composer command to add the package to your composer.json project's dependencies:
For Frontend and backend
Only for backend we need this package too
Laravel Nova admin - Backend part
Step 2: Database
-
You need to publish migration from package
-
And then you need to run migration for alltenant(s)
- Or only for one speciffic tenant
Step 3: Update database with default language
- Update database field "multilang_language" to default language for your website
Step 4: Add field
-
Add field to your (Operater) resource into "fields" method
-
Or if you use conditional fields than just add this into "fields" method
- Fields where category depends on language select
Step 5: If you are using conditional fields
Add this in tenant-default config
Add this in tenant-{{tenant name}} config
Step 6: Add languages
In your "config\app.php" add multilanguage locales (use ISO language codes). For example:
Frontend part
Step 7: Frontend part
Add helper function to "composer.json" file
And then run:
And change default "route()" method to "multilang_route()"
Step 8: Add languages
In your "config\app.php" add multilanguage locales (use ISO language codes). For example:
Step 9: Add hreflang metatags
-
For hreflang metatags add this to yout
master.blade
file in head tag - At the bottom of
app.php
add this part of code and change values according to the website settings