Best practices for multi language site across different sub domains

前端 未结 3 1212
遇见更好的自我
遇见更好的自我 2021-01-13 19:27

I am looking to build a site in ASP.NET. I need it to be in french and english with the domains setup like so:

en.mysite.com fr.mysite.com

I do not want to

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-13 19:57

    As I understand correctly you want to place all files in the root directory but use subdomains for different languages.

    I think that en.mysite.com and fr.mysite.com must be just aliases and should tell asp.net application what language to use. You can change culture settings with code. It is well-described here.

    But from my point of view it is a better way to provide language settings on the main domain with some default language and ability to swith between languages. And if user advice to change language - he will just click one link. Language settings шт this case can ne stored anywhere (user profile, cookie, session, database if registered user etc.).

提交回复
热议问题