- Issue created by @stefan.korn
- Merge request !14Issue #3542424: Language select list widget - setting has no effect → (Open) created by stefan.korn
- 🇳🇱Netherlands johnv
Committed with credits in the issue. Thanks.
The patch became much bigger when testing:
- adding defaultSettings();
- encapsulating the value formatting in one function, both for formatter and widget.Icons are still not supported in widget. I guess that is not possible, since select widget supports only a ascii string?
- 🇩🇪Germany stefan.korn Jossgrund
Thanks for quick commit and refactoring the code.
Yeah, icons might be difficult in select list.
Maybe like this: https://developer.mozilla.org/en-US/docs/Learn_web_development/Extension...
Or maybe using Unicode emoji flags, like so: https://gist.github.com/chrisjonesio/2f693fd9853c5450345e18c836577393
But that surely is a bigger feature request. Maybe if I find the time ... The unicode emoji flags seem like an interesting thing more generally. Like having a service or library that returns you the flag emoji if you pass ISO 3166 code or something like that.
- 🇳🇱Netherlands johnv
Thanks, I created
✨ Add lanuguageicons to Widget values Active
and
✨ Add SelectWidget formatting options to AutocompleteWidgets Active - 🇳🇱Netherlands johnv
Please confirm if current codebase deserves a new version, of if you think it needs a bit extra
- 🇭🇺Hungary nagy.balint
I believe this commit broke the module, since
Fatal error: Uncaught Error: Class "Drupal\languagefield\Plugin\Field\FieldType\TranslatableMarkup" not found in languagefield/src/Plugin/Field/FieldType/LanguageItem.php:38
as the commit introduced
label: new TranslatableMarkup("Language"), description: new TranslatableMarkup("An entity field to store a custom language."),
but TranslatableMarkup is not in the "use" section.