• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Url Romanization Issues

#1
on library/xenforo/link.php folder, there is array for url romanization.

for example from array ;

"ö" => "o",

but whenever I post new thread "ö" will be "oe".

so how can I fix it?
 
Last edited:

Mike

XenForo developer
Staff member
#2
URL romanization is not done there and uses a system that may vary in correctness by language. You will need to modify the code to fit your needs. (Moved to development discussions.)
 
#5
It should be as following for Turkish:

Code:
  // Turkish
  'ç'=>'c','ğ'=>'g','ı'=>'i','ö'=>'o','ş'=>'s','ü'=>'u',
  'Ç'=>'C','İ'=>'I','Ö'=>'O','Ş'=>'S','Ü'=>'U',
 
#7
Yeah, I agree with you.

However; if they integrate Turkish charset rules in core then there is no need to provide an option in ACP tho. This is one time requirement for most people.
 

yavuz

Well-known member
#8
Yeah, I agree with you.

However; if they integrate Turkish charset rules in core then there is no need to provide an option in ACP tho. This is one time requirement for most people.
I'm sure there are other languages who needs this as well. A simple option to replace custom charachters shouln't be that hard.
 

shorepower

Active member
#9
Setting up a Swedish site and would like to understand how I would change the utf8.php file to correctly display the URLs. Where in the file would I make these changes?

Thanks in advance

Current translation.

"ö" ==> "oe"
"ä" ==> "ae"
"å" ==> "a"

I would like the following translation

"ö" ==> "o"
"ä" ==> "a"
"å" ==> "a"

and for capital letters

"Ö" ==> "O"
"Ä" ==> "A"
"Å" ==> "A"
 

shorepower

Active member
#12
Thx Brogan. I have the file but I have a hard time understanding how to make the actual changes in utf8.php. Sorry if I was unclear
Tried to update the 'ae' i found to 'a' but then I get an execution error

Zend_Controller_Response_Exception: Cannot send headers; headers already sent in /www/webvol1/le/6vbwakak4dlpmvqx/mydomain.com/public_html/xenforo/library/Lgpl/utf8.php, line 1 - library/Zend/Controller/Response/Abstract.php:321

I have a hard time understanding the code in this file, hence, I'm not sure on where changes are to be entered.
 

Jeremy

Well-known member
#13
This is just an array, so its syntax is standard:
PHP:
'ä'=>'a'
If you want to change the replace value, set a to something else, and leave the rest the same.
 

shorepower

Active member
#14
Jeremy. Thanks but I really do not know were to make the changes. Please find attached the utf8.php file for 1.22 of Xenforo and if possible tell me what line number I need to change. I can for instance not find 'ä'=>'ae' anywhere in the file, still when I switch on Romanization it will execute just that in the URL, turning"ä" to "ae"
 

Attachments

Last edited:
#15
This is just an array, so its syntax is standard:
PHP:
'ä'=>'a'
If you want to change the replace value, set a to something else, and leave the rest the same.
So I "solved" it. I have changed all "ae" and "Ae" to "a" / "A" + changed all "oe" and "Oe" to "o" / "O"

It's still not clear if this will affect other parts of the translation but at least it seems like it works so far. As the above translation exists in 4-5 places in utf8.php knowing exactly were to change is 100% transparent to me.

Hopefully it will be re-producable in future versions on Xenforo as this will set the URL-names
 

Jeremy

Well-known member
#17
Do you have any add-ons installed about server errors? As far as I'm aware, there is no such email in the default software.