skip to Main Content

I’m currently working on a multi language website project. I have two languages in my website (Russian, English). English is the main language.

Basically the problem is: Should I make the homepage like www.example.com/en OR www.example.com/? And maybe redirect to sub directory from main page?
Or my main home page should have a sub directory or should it be empty?

2

Answers


  1. better way is set default language as on defult url .. if you use framework like laravel of som… Language strings are stored in files within the app/lang directory. Within this directory there should be a subdirectory for each language supported by the application.

    app
    /lang
        /en
            homepage.php
        /es
            homepage.php
    

    read this article i hope u can get basic idea about process of thishttps://laravel.com/docs/4.2/localization

    Login or Signup to reply.
  2. The best way would be to use a language slug for every language, even the default one. Then, you can detect and redirect users based on their browser’s language, redirecting always by 302. In your case, it would be as follows:

    It is important to remember that you should redirect users only if they are requesting the canonical domain or the default subdomain: http://www.domain.com or domain.com

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search