Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7828077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:11:04+00:00 2026-06-02T10:11:04+00:00

I want to develop a site with 2 languages, a default one, my native

  • 0

I want to develop a site with 2 languages, a default one, my native language and an optional English. I plan to have my domains as such:

www.mydomain.example/tr/
www.mydomain.example/en/

By default, once a user enter mydomain.example. they will be redirected to /tr/ version and select to go to the /en/ if they want via a top menu. And here is my question.

What is the best Django way to maintain both languages, please note that I don’t want automatic translation but I want to maintain texts for both languages myself.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:11:05+00:00Added an answer on June 2, 2026 at 10:11 am

    As I see it, you have two main options here:

    (1) You can keep two separate copies of the site as different Django apps and simply have your urlconf point to those apps– so url(r'^/en/', include(myproject.en)) would be in your urlconf to point to your English app, and the other for the other language. This would involve maintaining different sets of urlconfs and different html templates, etc for the two apps, which could be useful if you’re interested in having the URLs themselves also reflect the different languages (eg Spanish “/pagina/uno” vs English “/page/one”).

    (2) You record the language preference in a cookie (which you should really do anyway) using Django sessions, and then have the template deliver the appropriate version of the text however you like from that cookie. The code for this could be:

    # views.py
    
    # default to your native language
    request.session['lang'] = 'tr'
    
    # someone clicks the link to change to English
    def switch_to_English_link(request):
        request.session['lang'] = 'en'
    

    And then in the templates, to gather this information, you’d use:

    <!-- my_django_template.html -->
    <div>
      <span>
         {% if request.session.lang == "en" %}
            This is my text in English!
         {% else %}
            Şimdi benim sitede Türk var!
         {% endif %}
      </span>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net3.5 website.want to deploy this site on iis.After deploy my default
I have installed xt:commerece a shoping cart related site. I want to develop a
I want to develop a site that will allow be to publish information to
I want to develop a online karaoke site where users can select a video
I want to develop a social networking web site in java. I want to
Hi I want to develop my own hosting site but i do not know
I'm new in ASP.NET MVC2. But I want to develop a simply Newsletter site.
I want to develop an app with the Spotify API. I have downloaded the
I want to develop a site which can compare two products based on their
I am using Wordpress script in my actual site, but I want to develop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.