Fix for slugs with international chars #1921 #1922
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR solves issue #1921, by allowing a new configuration setting to use a different strategy to generate slugs, more suitable for international users.
It adds a new option on
Global settings
>Permalink
, that allows replacing accented chars likeá
,é
with ASCII charsa
,e
:It uses the
intl
PHP module, and thus the PR includes some changes on building docker images.The code autodetects the presence of the
intl
PHP module and for those setups that will not include it, the new option will not show.Transliteration is done using the
intl
functiontransliterator_transliterate
, that allows providing a mapping for the transliteration. The mapping is provided in a configuration setting with a default value.The PR is against stable/2.8.x branch to allow other AtoM users to have it available as soon as it is merged.