Closed gomes2191 closed 1 year ago
Check out this option, bad code but quick solution
diff --git a/laravel-admin/src/Form/Field/Select.php b/laravel-admin/src/Form/Field/Select.php
index c3a88f9..6f7bef7 100644
--- a/laravel-admin/src/Form/Field/Select.php
+++ b/laravel-admin/src/Form/Field/Select.php
@@ -25,6 +25,7 @@ class Select extends Field
*/
protected static $js = [
'/vendor/laravel-admin/AdminLTE/plugins/select2/select2.full.min.js',
+ '/vendor/laravel-admin/AdminLTE/plugins/select2/i18n/pt-BR.js',
];
/**
@@ -40,7 +41,7 @@ class Select extends Field
/**
* @var array
*/
- protected $config = [];
+ protected $config = ['language' => 'pt-BR'];
/**
* @var string
Dynamic change
$form->select($column[, $label])
->options([1 => 'foo', 2 => 'bar', 'val' => 'Option name'])
->config('language', config('app.locale'));
Solved, thanks @Ladel for the tip.
Description:
Does anyone know how to solve the select2 plugin not translating problem? I've tried setting in![image](https://user-images.githubusercontent.com/4576117/231859653-c021caa6-96bd-4928-9475-b95b1e75e0b2.png)
Select.php
and it didn't work.