Closed amehdi92 closed 8 years ago
Hello!
This is not the way how translation works in django. You don't need to have separate template for each language. Create one template, mark translatable strings (for example by using {% trans '...' %}
template tag) and translate those strings. Please, read the docs carefully.
Closing, if some additional help is needed, please reopen
Hello,
I'm working on a bilingual website and decided to use django-solid-i18n. However, after putting my index in /static/templates/fr and /static/templates/en, I got the message: TemplateDoesNotExist at /fr/.
Here's my views.py:
from django.shortcuts import render
def home(request): context={} template='index.html' return render(request,template,context)
And urls.py: from django.contrib import admin from django.conf.urls import patterns, include, url from solid_i18n.urls import solid_i18n_patterns import profiles.views
urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^i18n/', include('django.conf.urls.i18n')), ]
urlpatterns = solid_i18n_patterns('', url(r'^$', profiles.views.home, name='home'),
)