Review main Merged

77470[FEATURE] Add all countries and their localized names

Benni Mack CR +2 V +2 Impossible +90225 −1 updated 01/19/23, 11:12

Commit message

TYPO3 now supports loading a list of all
countries of the world in all supported
translations that TYPO3 has to offer - out of the box.

For this, a dev-dependency "sokil/php-isocodes-db-i18n"
package is used, which contains a list of
all countries (ISO 3166-1), their short names,
their official names in english, and optional
translations.

This package fetches the data from debian
repositories and is updated automatically
on the second day of each month.

A new Build script then transfers the information
and the translations (originally in PO files)
via symfony/translation into a PHP class
and XLF translations for country names ("France") and
official country names ("French Republic").

The Build script is already prepared
to also fetch language script codes in the future,
along with languages and/or currencies as well.

A new API (CountryProvider) is available
which returns the countries, and prepared
label strings to be used with TYPO3's language
mechanism.

A ViewHelper <f:form.countrySelect>
is added which can be used in Fluid templates.

Example:
  <f:form.countrySelect name="country" value="DE" sortByOptionLabel="true" prioritizedCountries="{0: 'DE', 1: 'AT', 2: 'CH'}"/>

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 66

Show 46 more files