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

Url Romanization Issues

Discussion in 'XenForo Development Discussions' started by vefaliahmet, Aug 19, 2013.

  1. vefaliahmet

    vefaliahmet Member

    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: Aug 19, 2013
  2. Mike

    Mike XenForo Developer Staff Member

    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.)
     
  3. vefaliahmet

    vefaliahmet Member

    in your array , "ö" => "o". why it can't be when I post?
     
  4. vefaliahmet

    vefaliahmet Member

    yeah.i found romanization lookup table on utf8.php file.... may be i can set up my language.
     
  5. AyKuT

    AyKuT Member

    It should be as following for Turkish:

    Code:
      // Turkish
      'ç'=>'c','ğ'=>'g','ı'=>'i','ö'=>'o','ş'=>'s','ü'=>'u',
      'Ç'=>'C','İ'=>'I','Ö'=>'O','Ş'=>'S','Ü'=>'U',
     
  6. yavuz

    yavuz Well-Known Member

  7. AyKuT

    AyKuT Member

    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.
     
  8. yavuz

    yavuz Well-Known Member

    I'm sure there are other languages who needs this as well. A simple option to replace custom charachters shouln't be that hard.
     
  9. shorepower

    shorepower Active Member

    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"
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I think it's in library\Lgpl\utf8.php
     
  11. shorepower

    shorepower Active Member

    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
     
  12. shorepower

    shorepower Active Member

    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.
     
  13. Jeremy

    Jeremy XenForo Moderator Staff Member

    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.
     
  14. shorepower

    shorepower Active Member

    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"
     

    Attached Files:

    Last edited: Oct 4, 2013
  15. shorepower

    shorepower Active Member

    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
     
  16. AyKuT

    AyKuT Member

    Does anyone know how to avoid this email notification continuously? Because of localization in this file, I keep receiving such emails.
     
  17. Jeremy

    Jeremy XenForo Moderator Staff Member

    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.
     
  18. AyKuT

    AyKuT Member

Share This Page