Hi everybody

First a few words of congratulation to those who work on developping
Django, it feels efficient from my inexperienced user's point of view.

Now the problem... I have just begun working on my website using
Django, and I want to use internationalize my website. Base language
is French. I have followed the instructions from
http://www.djangobook.com/en/beta/chapter19/, notably making a
django.po file and giving translations in English of some French
blocks.

Now, when there are accents in the original French string, it leaves
this string instead of giving the English one. If there is no accent,
translation works.

Any idea of what could be wrong?

As a PS, I add the (mock) template I use, the django.po file, the
source html file when browsing in French and the same when browsing in
English.

Thank you very much for any help
Jonas

************************
templates/pro/base_pro.html:
------------
{% load i18n %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//
{{ LANGUAGE_CODE|upper }}"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
<head>
    <meta http-equiv="Content-type" content="text/html;
charset=utf-8">
    <link rel="stylesheet" href="pro.css" />
    <title>{% block title %}{% trans "Jonas Kahn: Page
professionnelle" %}{% endblock %}</title>
</head>

<body>
    <div id="sidebar">
        {% block sidebar %}
        <ul>
            <li><a href="/pro/">{% trans "Accueil" %}</a></li>
            <li><a href="/pro/recherche/">{% trans "Th�mes de
recherche" %}</a></li>
            <li><a href="/pro/publications/">{% trans "Publications"
%}</a></li>
            <li><a href="/pro/enseignement/">{% trans "Enseignement"
%}</a></li>
            <li><a href="/pro/presentations/">{% trans "Pr�sentations"
%}</a></li>
            <li><a href="/pro/liens/">{% trans "Liens" %}</a></li>
            <li><a href="/pro/cv/">{% trans "Curriculum Vitae" %}</a></
li>
        </ul>
        {% endblock %}
    </div>

    <div id="content">
        {% block content %}{% endblock %}
    </div>
</body>
</html>
------------------------------------------

------------------------------------------
locale/en/LC_MESSAGES/django.po

# 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 PROTECTED]>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-31 23:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n"
"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: templates/pro/base_pro.html:15
msgid "Accueil"
msgstr "Home"

#: templates/pro/base_pro.html:16
msgid "Th�mes de recherche"
msgstr "Research"

#: templates/pro/base_pro.html:17
msgid "Publications"
msgstr "Publications"

#: templates/pro/base_pro.html:18
msgid "Enseignement"
msgstr "Teaching"

#: templates/pro/base_pro.html:19
msgid "Pr�sentations"
msgstr "Presentations"

#: templates/pro/base_pro.html:20
msgid "Liens"
msgstr "Links"

#: templates/pro/base_pro.html:21
msgid "Curriculum Vitae"
msgstr "Curriculum Vitae"
-----------------------------------------------------

-----------------------------------------------------
Resulting html source in French


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="fr" lang="fr">
<head>
    <meta http-equiv="Content-type" content="text/html;
charset=utf-8">
    <link rel="stylesheet" href="pro.css" />
    <title>Jonas Kahn: Page professionnelle</title>
</head>

<body>
    <div id="sidebar">


        <ul>
            <li><a href="/pro/">Accueil</a></li>
            <li><a href="/pro/recherche/">Th�mes de recherche</a></li>
            <li><a href="/pro/publications/">Publications</a></
li>
            <li><a href="/pro/enseignement/">Enseignement</a></
li>
            <li><a href="/pro/presentations/">Pr�sentations</a></li>
            <li><a href="/pro/liens/">Liens</a></li>

            <li><a href="/pro/cv/">Curriculum Vitae</a></li>
        </ul>

    </div>

    <div id="content">

    </div>
</body>
</html>




-----------------------------------------------------
Resulting Html source in English


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-type" content="text/html;
charset=utf-8">
    <link rel="stylesheet" href="pro.css" />
    <title>Jonas Kahn: Professional webpage</title>
</head>

<body>
    <div id="sidebar">


        <ul>
            <li><a href="/pro/">Home</a></li>
            <li><a href="/pro/recherche/">Th�mes de recherche</a></li>
            <li><a href="/pro/publications/">Publications</a></
li>
            <li><a href="/pro/enseignement/">Teaching</a></
li>
            <li><a href="/pro/presentations/">Pr�sentations</a></li>
            <li><a href="/pro/liens/">Links</a></li>

            <li><a href="/pro/cv/">Curriculum Vitae</a></li>
        </ul>

    </div>

    <div id="content">

    </div>
</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to