Hi Estartu,

As far as I know, extractors only extract messages to .pot files (PO 
Templates), as their name implies, nothing more. POT files are not 
associated to a language, they just list messages IDs found in the source 
code, with the corresponding translations left empty. So, I have doubts 
about your interpretation that "texts in the code are interpreted as 
English by default".

Suggestion: look at the headers of your POT file(s), and see if there is a 
language defined there (there shouldn't be). It should look like;

#
# SOME DESCRIPTIVE TITLE
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2021-04-06 01:56+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingua 4.14\n"


As a second step, you merge your POT file with your existing language files 
(PO files, one per language, whereas there is usually only one POT file per 
project). The merge process basically:

- creates new entries with empty translations,
- leaves the existing entries alone (apart from updating the locations in 
the code where they were encountered),
- comments out entries no longer existing in the code.

At that stage, you can update the translations by hand (Emacs, PoEdit, ...) 
in the PO files (not the POT file, which you should never touch), and then 
compile them into MO files when you're done. You're not using POEdit on the 
POT file, right?

Hope this helps,

Laurent.

Le samedi 19 juin 2021 à 10:20:14 UTC+2, [email protected] a écrit :

> Hi Steve,
>
> I have i18n set up an working but all templates and texts in the code 
> are interpreted as English by default.
>
> My problem is that I want to write texts and Templates in German and do 
> the English translations later.
>
> Is there a way to say. "Hey extractor, any text you find is German not 
> English."
>
> This may be only a tool problem because poedit always complain about 
> editing the default language when I try to do the English translations.
>
> Does the gettext system have a default language or is the just poedit 
> being ignorant.
>
> Regards
> Estartu
>
>
> Am 09.06.21 um 09:24 schrieb Steve Piercy:
> > A Pyramid project has no default language, internationalization (i18n), 
> or localization (l10n). You may add them and their translations to a 
> project.
> > 
> > https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/i18n.html
> > 
> > Once you establish i18n and i10n in your project, you may set any 
> supported language as the default.
> > 
> > --steve
> > 
> > 
> > On 6/8/21 11:07 PM, Gerhard Schmidt wrote:
> >> Hi,
> >>
> >> I'm developing some web applications form my company using pyramid. 
> Most of the time I develop them in German first and do translations later.
> >>
> >> This causes me some unnecessary work when starting with translations, 
> because default language is English. So I have to change the German texts 
> to English and move the German to the translation files.
> >>
> >> It would be much easier to simply define the default language as German 
> and add English translations. As you can guess. German is my main language 
> so I can outsource the translations to English someone and concentrate on 
> the German texts.
> >>
> >> Is there a way to define that a pyramid project is in German when using 
> i18n.
> >>
> >> Regard
> >>   Estartu
> >>
> >>
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/1dc461cf-65f6-4361-9778-eb015f60b647n%40googlegroups.com.

Reply via email to