- Issue created by @jamsilver
The Country → module exists and looks in good health. It provides a field for storing a 2-letter ISO country code, an autocomplete widget and a select form element that uses core's standard list of countries for its options.
It seems like a natural fit here to use this to improve the UX for adding countries.
I can think of three ideas in this regard:
country_code
propertyIn my opinion, LCN should also consider removing the name
field from Country. Would it not be sufficient to implement Country::label()
and report the name that matches its 2-letter country code from core's standard list? Is there a realistic use case where someone would wish to pick a standard country but not use the standard name for it?
One downside of this suggestion is it becomes more difficult to use a non-standard country code for a Country. Here are some thoughts about that:
NegotiationLanguageCountryUrlForm
, which could provide means for the site builder to specify a custom url prefix for each country, or each language, or even each language-country pair (this idea is also suggested in the last paragraph of
#3486180-8: Does not support langcode url prefixes more complex than 2 letters (e.g. zh-hans, zh-hant, haw) →
).
On the Add/Edit country form, replace the Country name and Country code fields with a single Country field:
Perhaps to some fields on the Country Content Entity Type (depending on the chosen integration, see above).
Active
1.0
User interface