HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

SEO Friendly in URL Vietnamese

How to make SEO friendly URL with vietnamese?

URL: http://domain.com/kiểm-tra

To: http://domain.com/kiem-tra



  • Options

    its in the config file, you literally manually change it there, it’s not a setting from the app itself.

  • Options

    @haseeb Can you give more specific instructions? Thanks very much!

  • Options

    Please help me!

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    There is no setting which would does any conversion from e.g. "ể" to "e". You need a custom plugin for that, but that plugin would be easy to write. The difficult thing is to find a "translation table" of all those vietnames characters to ascii pendants.

    BUT I doubt that this is needed. If I search for "kiem tra" I get results that show "kiểm tra". If you look at popular Vietnamese pages, do they convert all of there urls?

  • Options

    Try This..

    import unicodedata

    # Original URL

    url = "http://domain.com/kiểm-tra"

    # Normalize the URL by removing accents

    normalized_url = unicodedata.normalize('NFD', url).encode('ascii', 'ignore').decode('utf-8')

    # Replace spaces with hyphens

    seo_friendly_url = normalized_url.replace(' ', '-').lower()

    print(seo_friendly_url)  # Output: "http://domain.com/kiem-tra"

    Result will be

    http://domain.com/kiểm-tra to http://domain.com/kiem-tra,

    I hope it helps.

Sign In or Register to comment.