first commit
This commit is contained in:
parent
e6b559815d
commit
e5462f3cd8
BIN
db.sqlite3
Normal file
BIN
db.sqlite3
Normal file
Binary file not shown.
BIN
locale/en/LC_MESSAGES/django.mo
Normal file
BIN
locale/en/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
35
locale/en/LC_MESSAGES/django.po
Normal file
35
locale/en/LC_MESSAGES/django.po
Normal file
@ -0,0 +1,35 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: multilanguage/settings.py:34
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:35
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:36
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
|
||||
#: web/views.py:5
|
||||
msgid "hola"
|
||||
msgstr "hello"
|
BIN
locale/es/LC_MESSAGES/django.mo
Normal file
BIN
locale/es/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
35
locale/es/LC_MESSAGES/django.po
Normal file
35
locale/es/LC_MESSAGES/django.po
Normal file
@ -0,0 +1,35 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: multilanguage/settings.py:34
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:35
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:36
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
|
||||
#: web/views.py:5
|
||||
msgid "hola"
|
||||
msgstr "hola"
|
BIN
locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
35
locale/fr/LC_MESSAGES/django.po
Normal file
35
locale/fr/LC_MESSAGES/django.po
Normal file
@ -0,0 +1,35 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-12-09 09:16+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: multilanguage/settings.py:34
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:35
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
|
||||
#: multilanguage/settings.py:36
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
|
||||
#: web/views.py:5
|
||||
msgid "hola"
|
||||
msgstr "(hola en frances)"
|
BIN
multilanguage/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
multilanguage/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
multilanguage/__pycache__/settings.cpython-310.pyc
Normal file
BIN
multilanguage/__pycache__/settings.cpython-310.pyc
Normal file
Binary file not shown.
BIN
multilanguage/__pycache__/urls.cpython-310.pyc
Normal file
BIN
multilanguage/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
multilanguage/__pycache__/wsgi.cpython-310.pyc
Normal file
BIN
multilanguage/__pycache__/wsgi.cpython-310.pyc
Normal file
Binary file not shown.
@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
@ -30,6 +30,11 @@ ALLOWED_HOSTS = []
|
||||
|
||||
# Application definition
|
||||
|
||||
LANGUAGES = (
|
||||
('en', _('English')),
|
||||
('fr', _('French')),
|
||||
('es', _('Spanish')),
|
||||
)
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
@ -44,6 +49,7 @@ MIDDLEWARE = [
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
@ -121,3 +127,6 @@ STATIC_URL = 'static/'
|
||||
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
LOCALE_PATHS = [
|
||||
BASE_DIR / 'locale/',
|
||||
]
|
||||
|
@ -16,7 +16,9 @@ Including another URLconf
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
|
||||
urlpatterns = [
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from web.views import home
|
||||
urlpatterns = i18n_patterns(
|
||||
path('admin/', admin.site.urls),
|
||||
]
|
||||
path('', home)
|
||||
)
|
||||
|
0
web/__init__.py
Normal file
0
web/__init__.py
Normal file
BIN
web/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
web/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
web/__pycache__/views.cpython-310.pyc
Normal file
BIN
web/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
web/admin.py
Normal file
3
web/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
web/apps.py
Normal file
6
web/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WebConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'web'
|
0
web/migrations/__init__.py
Normal file
0
web/migrations/__init__.py
Normal file
3
web/models.py
Normal file
3
web/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
3
web/tests.py
Normal file
3
web/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
6
web/views.py
Normal file
6
web/views.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render, HttpResponse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
# Create your views here.
|
||||
def home(request):
|
||||
welcome = _("hola")
|
||||
return HttpResponse(welcome)
|
Loading…
x
Reference in New Issue
Block a user