Appearance
Translator
FlexHD supports Multi Language (i18n) feature, and this is a tool to manage each language. You can use to add, delete and edit in each language.
To use the built-in Multi Language (i18n) features, one needs to create a directory structure as follows:
├─ app/
├─ ...
├─ lang/
│ ├─ en/
│ │ ├─ routes.php
│ │ ├─ seo.php
│ │ ├─ theme.php
│ ├─ id/
│ │ ├─ routes.php
│ │ ├─ seo.php
│ │ ├─ theme.php
│ ├─ ...
└─ config.php
├─ app/
├─ ...
├─ lang/
│ ├─ en/
│ │ ├─ routes.php
│ │ ├─ seo.php
│ │ ├─ theme.php
│ ├─ id/
│ │ ├─ routes.php
│ │ ├─ seo.php
│ │ ├─ theme.php
│ ├─ ...
└─ config.php
In each lang dir there are routes.php
, seo.php
and theme.php
files.
routes.php
To translate routes / permalinks, the following example:
domain.com/watch-movie-title-id
domain.com/watch-movie-title-id
If active in Indonesian id
domain.com/nonton-film-title-id
domain.com/nonton-film-title-id
dir lang/en/routes.php
php
<?php
return [
'single-movie' => 'movie-watch-{slug?}-online-{id}',
'single-series' => 'watch-series-{slug?}-online-{id}',
'watch' => 'watch/{type}-{slug?}-{id}',
...
];
<?php
return [
'single-movie' => 'movie-watch-{slug?}-online-{id}',
'single-series' => 'watch-series-{slug?}-online-{id}',
'watch' => 'watch/{type}-{slug?}-{id}',
...
];
You can edit the route according to the language.
dir lang/id/routes.php
php
<?php
return [
'single-movie' => 'nonton-film-{slug?}-online-{id}',
'single-series' => 'nonton-tv-{slug?}-online-{id}',
'watch' => 'nonton/{type}-{slug?}-{id}',
...
];
<?php
return [
'single-movie' => 'nonton-film-{slug?}-online-{id}',
'single-series' => 'nonton-tv-{slug?}-online-{id}',
'watch' => 'nonton/{type}-{slug?}-{id}',
...
];
seo.php
To translate SEO in title
and description
metadata.
dir lang/en/seo.php
php
<?php
return [
'home_title' => 'Stream Free Movies & TV Shows',
'home_description' => 'Browse and Watch all your favorite online movies & series for free!',
'single_movie_title' => 'Watch :title :year Movie Online Free',
'single_movie_description' => 'Watch :title :description :year HD Free TV Series',
...
];
<?php
return [
'home_title' => 'Stream Free Movies & TV Shows',
'home_description' => 'Browse and Watch all your favorite online movies & series for free!',
'single_movie_title' => 'Watch :title :year Movie Online Free',
'single_movie_description' => 'Watch :title :description :year HD Free TV Series',
...
];
You can edit the route according to language.
dir lang/id/seo.php
php
<?php
return [
'home_title' => 'Streaming Film & Acara TV Gratis',
'home_description' => 'Jelajahi dan Tonton semua film & serial online favorit Anda secara gratis!',
'single_movie_title' => 'Tonton :title :year Lengkap Online Gratis',
'single_movie_description' => 'Tonton :title :description :year TV Gratis HD tahun',
...
];
<?php
return [
'home_title' => 'Streaming Film & Acara TV Gratis',
'home_description' => 'Jelajahi dan Tonton semua film & serial online favorit Anda secara gratis!',
'single_movie_title' => 'Tonton :title :year Lengkap Online Gratis',
'single_movie_description' => 'Tonton :title :description :year TV Gratis HD tahun',
...
];
theme.php
To translate the front page template.
dir lang/en/theme.php
php
<?php
return [
'home' => 'Home',
'movie' => 'Movie',
'tv' => 'Tv Series',
'trending' => 'Trending',
...
];
<?php
return [
'home' => 'Home',
'movie' => 'Movie',
'tv' => 'Tv Series',
'trending' => 'Trending',
...
];
You can edit the template according to language.
dir lang/id/theme.php
php
<?php
return [
'home' => 'Beranda',
'movie' => 'Film',
'tv' => 'Serial TV',
'trending' => 'Sedang tren',
...
];
<?php
return [
'home' => 'Beranda',
'movie' => 'Film',
'tv' => 'Serial TV',
'trending' => 'Sedang tren',
...
];