Kormi
TCTwill CMS
•Created by Kormi on 5/23/2024 in #👊support
Multilingual URL Prefixes
Hello,
I have set up multiple languages (en, it, fr) on my website. I would like to display the English version without the "/en" prefix, using simply "/".
Is this possible by default in Twill 2.12.4?
2 replies
TCTwill CMS
•Created by Kormi on 5/22/2024 in #👊support
Twill 2.12.4 localization problem with siteground
Hi,
For one of my clients, I developed a CMS with Twill 2.8.12. Now, they are asking me to enable multilingual functionalities. Perfect.
Locally, everything seems to work fine.
However, on the server on SiteGround, whenever I view a language, it always goes to a 404 error.
$locales = LaravelLocalization::getSupportedLocales();
$prefix = (count($locales) > 1) ? LaravelLocalization::setLocale() : '';
// cache.headers
$locale_middleware = ['localeViewPath', 'cache.headers'];
$middleware = (count($locales) > 1) ? ['localize', 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath', 'cache.headers'] : $locale_middleware;
Route::group([
'prefix' => $prefix,
'middleware' => $middleware,
], function () {
// HOME
Route::get('/', [PageController::class, 'home'])->name('home');
});
I copied the database from the production server, and I can't understand why it works locally but not in production.
Twill.php
'available_user_locales' => [
'en',
'fr',
// 'it',
// 'ru',
],
laravellocalization.php
'supportedLocales' => [
'en' => ['name' => 'English', 'script' => 'Latn', 'native' => 'English', 'regional' => 'en_GB'],
'fr' => ['name' => 'French', 'script' => 'Latn', 'native' => 'français', 'regional' => 'fr_FR'],
]
translatable.php
<?php
return [
'locales' => [
'en',
'fr',
// 'it',
// 'ru',
],
'locale_separator' => '-',
'locale' => null,
'use_fallback' => false,
'use_property_fallback' => true,
'fallback_locale' => 'en',
'translation_suffix' => 'Translation',
'locale_key' => 'locale',
'to_array_always_loads_translations' => true,
];
9 replies
TCTwill CMS
•Created by Kormi on 1/27/2023 in #👊support
Deploy with deployer and composer update
Hi,
I'm tryng to deploy my project on a server with deployer (php).
When I do "composer update" locally every works fine.
But in staging or productions this error appears
[staging] Generating optimized autoload files
[staging] > Illuminate\Foundation\ComposerScripts::postAutoloadDump
[staging] > @php artisan package:discover --ansi
[staging] In RouteRegistrar.php line 107:
[staging] Attribute [singleton] does not exist.
[staging] Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
This is my composer.json
{
...
"require": {
"php": "^7.3|^8.0",
"area17/twill": "2.12.4",
"area17/twill-image": "^1.0",
"blade-ui-kit/blade-heroicons": "^1.2",
"cweagans/composer-patches": "^1.7",
"cwsdigital/twill-metadata": "^1.2.2",
"fruitcake/laravel-cors": "^2.0",
"kalnoy/nestedset": "^6.0",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"laravelium/sitemap": "^8.0",
"mcamara/laravel-localization": "^1.7",
"sendinblue/api-v3-sdk": "8.x.x",
"ext-json": "*",
"ext-pdo": "*",
"astrotomic/laravel-translatable": "^11.5",
"cartalyst/tags": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"doctrine/dbal": "^2.12|^3.0",
"guzzlehttp/guzzle": "^6.2|^7.0",
"imgix/imgix-php": "^3.0",
"laravel/framework": "~5.6|~5.7|~5.8|^6.0|^7.0|^8.0|^9.0",
"laravel/socialite": "^4.2|^5.0",
"laravel/ui": "^1.0|^2.0|^3.0",
"league/flysystem-aws-s3-v3": "^1.0|^2.0|^3.0",
"league/glide-laravel": "^1.0",
},
"require-dev": {
"chillerlan/php-qrcode": "~2.0|~3.0|~4.0",
"deployer/deployer": "^7.1",
"friendsofphp/php-cs-fixer": "^2.16|^3.0",
"kalnoy/nestedset": "^5.0|^6.0",
"orchestra/testbench": "~3.3|~3.4|~3.5|~3.6|~3.7|~3.8|^4.0|^5.0|^6.0|^7.0"
},...
Someone can help me please?37 replies
TCTwill CMS
•Created by Kormi on 1/16/2023 in #👊support
Wysinwyg Editor Starting with source insted of visual
3 replies
TCTwill CMS
•Created by Kormi on 12/10/2022 in #👊support
How can I edit an indexColumn value?
Hi,
I have a boolean that i need to replace to "active" or "not active"
this is my indexColumns in my controller
protected $indexColumns = [
'status' => [
'field' => 'status',
'title' => 'Status',
'sort' => true,
'visible' => true,
],
....
];
How can I print "active" instead of 1?
Thank u16 replies