featdd / dpn_glossary

Glossary extension for TYPO3

Home Page:http://typo3.org/extensions/repository/view/dpn_glossary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Words with an accent on the first letter are displayed in the index under the Undescore group

dogawaf opened this issue · comments

If the first letter of a word is an accented letter, like É, the word is displayed under the Undescore group in the index.

I would suggest to use iconv in order to detect the first letter of a word:

$firstCharacter = strtolower(
    substr(
        iconv('UTF-8', 'ASCII//TRANSLIT', $term->getName()),
        0,
        1
    )
);

Hi @dogawaf,

ah you mean in the character list mode, I had similiar issues with the pagination and umlauts.
Here the solution for the repository was to add a static mapping for umlauts.

For the pagination and umlauts I wrote a bit of information in the documentation, where you have to set the proper database collation to be able to handle this properly.

Your code does'nt seem to work for me, but I don't know if you always want to have characters get simplified or seperated as it's own groups.

I have to try and think of a proper solution for this.

Greetings
Daniel

Hi @dogawaf,

I added some refactoring for the character grouped list here: a12f0b8

It uses PHP intl to transliterate the characters into their ASCII equivalents.
So to use use this you have to have the PHP extension installed in your setup, otherwise it will be ignored.

You would help me to test this and share your feedback before I merge this.

Greetings
Daniel

Hi @dogawaf,

have you been able to have a look at this and is working for you too?

Greetings
Daniel

Hi @featdd

I've just tested your commit, with success.
Thanks a lot, and sorry for the time it took to review it.

Hi @dogawaf,

thanks for the feedback, merged it and prepare the TER release.

Greetings
Daniel