Support » Plugin: WPGlobus - Multilingual Everything! » Language and country prefixes combined in the URL

  • Resolved scolin73


    Is it possible to have an option in WPGlobus about using combined language and country prefixes in URL?Something like en-US and en-CA.
    For USA, we will have mywebsite/en-US/webpage.html
    For Canada, we will have mywebsite/en-CA/webpage.html

Viewing 11 replies - 1 through 11 (of 11 total)
  • @scolin73 No, WPGlobus works with two-letter country/language identifiers.
    You can use /us/ and /ca/, for example.

    Thank you!

    Plugin Contributor Alex Gor


    No. WPGlobus uses two letter code only (like en, es, de)

    But is it technically possible to change it, I mean if I contract you especifically for this job?

    @scolin73 I afraid, we are not able to do it in the nearest future, sorry.

    You can use my previous suggestion about us and ca and if you really need the full code in the URL, you can fake then with some rewrite rules in the .htaccess.

    Thank you!

    No problem.

    I understand about using 2-letter code for language/country but sometimes it can be confused.

    For example, if I want to target public from Belgium and Netherlands, I can use BE for french in Belgium and NL for dutch in Netherlands, but what about identifying dutch language in Belgium? It is easy with nl-be but with 2-letter code it’s not so clear.

    Anyway, thanks for the tip about using some Htaccess rules. Any example rule you could show me to apply as a “fake” url?

    WPGlobus is a very nice plugin, and if this Htaccess solution works, I will use this plugin in my future website.

    I plan to use WPGlobus plus too, especially for the “draft” function.

    Thank you!

    Before any rewrite rules, you still need to figure out how to arrange the two-letter codes. You can make any combination of letters and flags. Please try.

    I don’t plan to use the two-letter code with flag in the switcher so any rewrite rule which redirects from let’s say mydomain/ca to mydomain/en-ca and mydomain/qc to mydomain/fr-ca will be fine.

    Rewrite rule, if it works, only “covers” the real URLs, which you still need to prepare using the ca, us and qc codes.

    Sorry I had misunderstood your last reply about how to arrange the two-letter codes.

    If I understand well, The URLs generated by WPglobus display a subdirectory for each language but the URLs do not exist, so htaccess rules can’t work.

    So I need to create real URLS with the two-letter codes for the languages I am interested, right?

    And if so, how could I do that?

    No, you did not understand. Do not create any folders, please.

    And – unfortunately – I think, the rewrite rules won’t work as I initially thought. Will be too complicated and will cause several issues.

    Sorry to disappoint.

    No problem,
    I will try in another way.
    Thank you for your time.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Language and country prefixes combined in the URL’ is closed to new replies.