A problem with Pretty URLs and German Umlauts
Permalink
I have experienced an inconsistency in how page names with German Umlauts are translated into pretty URLs: if a German Umlaut is located within a page name like for instance "Lösung", the canonical URL will be ".../loesung" what is correct.
However, if the first letter of a page name is an Umlaut like in "Übung", it will be converted into ".../bung" instead of ".../uebung" as it should be.
Is this a bug, or do i have to tweak the .htaccess to achieve the correct behaviour?
Michael
However, if the first letter of a page name is an Umlaut like in "Übung", it will be converted into ".../bung" instead of ".../uebung" as it should be.
Is this a bug, or do i have to tweak the .htaccess to achieve the correct behaviour?
Michael
Hi Jon,
cool, thank you for that information!
Now i just tried to copy an edited version of that file to the helpers directory at the root, believing it would simply override the one in the concrete/helpers directory, but unfortunately this leads to a
Obviously it's not enough to only copy text.php in the helpers directory, there must be more files/directories needed... Can you imagine which ones?
Thank you,
Michael
cool, thank you for that information!
Now i just tried to copy an edited version of that file to the helpers directory at the root, believing it would simply override the one in the concrete/helpers directory, but unfortunately this leads to a
Fatal error: Cannot redeclare class TextHelper in /.../helpers/text.php on line 20
Obviously it's not enough to only copy text.php in the helpers directory, there must be more files/directories needed... Can you imagine which ones?
Thank you,
Michael
With the current concrete5 5.6 the problem has changed a bit:
When adding a new page, ä, ö, ü (uppercase and lowercase) in page names are now transformed to a, o, u instead of ae, oe, ue, as it should be.
When adding a new page, ä, ö, ü (uppercase and lowercase) in page names are now transformed to a, o, u instead of ae, oe, ue, as it should be.
Just came across this issue myself and noticed, that "ü" becomes "u" and the other "Umlaute" likewise.
But that is not how it should be. For the German special characters it 'has to be' like that:
ä --> ae
ö --> oe
ü --> ue
ß --> ss
The only letter that's handled the right way is the "ß".
On the one hand it's disturbing for me as a native speaker and on the other hand I think I read some articles, that in therms of SEO it is important, that the "Umlaut" characters are converted the right way.
So, I'm going on hunt for finding the right lines in code, where to alter this. :)=
Cheers,
Sven
But that is not how it should be. For the German special characters it 'has to be' like that:
ä --> ae
ö --> oe
ü --> ue
ß --> ss
The only letter that's handled the right way is the "ß".
On the one hand it's disturbing for me as a native speaker and on the other hand I think I read some articles, that in therms of SEO it is important, that the "Umlaut" characters are converted the right way.
So, I'm going on hunt for finding the right lines in code, where to alter this. :)=
Cheers,
Sven
The conversion is done in /concrete/libraries/3rdparty/urlify.php.
Modifying this file should be simple enough. Just remember to copy the file under your root libraries and you can modify the contents however you like :)
Modifying this file should be simple enough. Just remember to copy the file under your root libraries and you can modify the contents however you like :)
Hi, thanks for your answer.
Just found me to that spot, but ...
... the correct are conversions set there. Unfortunately the "latin" conversion seems to take effect, not the german. How is that triggered?
Thanks in advance,
Sven
Just found me to that spot, but ...
... the correct are conversions set there. Unfortunately the "latin" conversion seems to take effect, not the german. How is that triggered?
Thanks in advance,
Sven
If You set your Language to German ist will work properly in concrete5 >= 5.6.2
Are you talking about the backend's language? If so, that's not a good way to trigger it. I prefer untranslated backends.
No, the site language is not directly connected to you user language.
You can also use the multilingual addon. but you must provide the desired language somehow because transliteration rules can vary between languages.
You can also use the multilingual addon. but you must provide the desired language somehow because transliteration rules can vary between languages.
Hi,
and that "somehow" is how?
Is there any setting in the C5 dashboard or is a lang-attribute in the template's source enough?
Am just testing the "Internationalization"-Addon but still experiencing the issue, that is discussed in the reviews at the moment. But you're right, maybe that could help, because a language is set for a whole branch of a website.
Sven
and that "somehow" is how?
Is there any setting in the C5 dashboard or is a lang-attribute in the template's source enough?
Am just testing the "Internationalization"-Addon but still experiencing the issue, that is discussed in the reviews at the moment. But you're right, maybe that could help, because a language is set for a whole branch of a website.
Sven
Either at /dashboard/system/basics/multilingual/ or in your site.php file: define('LOCALE', 'de_DE');
http://www.concrete5.org/developers/translate/...
http://www.concrete5.org/developers/translate/...
I would assume that this is only replacing lowercase characters, so your uppercase letter at the start gets missed and then removed later.
You could either add uppercase variants to this list, or add a strtolower() call in the Page::add() method, where it calls $txt->sanitizeFileSystem()...
Hope that helps,
Jon