• Resolved zeilbauer

    (@zeilbauer)


    Hello, we would like to have some files translated into German using Deepl API. The challenge: informal German – i.e. per Du should be chosen.

    Currently it takes the polite form. Is there anywhere I can set this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Hello.

    Please excuse my long reply, but this issue cropped up during development of the last release and I’d like to get it sorted.

    As of v2.5.1, Loco Translate supports DeepL’s formality parameter which can be “more”, “less” or “default”.

    I don’t know if this means there are three levels, or if the default simply implies “more” or “less” depending on the language. Perhaps as a DeepL customer, you know the answer to that?

    As to what gets sent to DeepL: Loco Translate takes the formality setting directly from the WordPress language code, as per the following examples:

    de_DE => default
    de_CH => default
    de_DE_formal => more
    de_CH_informal => less

    You can probably see the problem here. What should the formality setting be if no formality is specified? WordPress appear to be inconsistent with DE vs CH. WordPress doesn’t officially support de_DE_informal or de_CH_formal, so does that imply that de_DE is informal by default and de_CH is formal? I can hard-code those rules if so, but I don’t have any clarity on this issue and I am not a German speaker.

    Back to your question about how you can set the formality yourself. This is probably something I can add, but right now you would have to set your locale to a code that ends in “informal” to get the behaviour you want. This will probably cause you more problems.

    > does that imply that de_DE is informal by default and de_CH is formal?

    Yes. Unfortunately the defaults are flipped for these locales in WordPress.

    Plugin Author Tim W

    (@timwhitlock)

    Thanks for jumping in @swissspidy. I’m glad to know at least that the absence of the variant implies a default formality, even if it is not self-evident what that level is. i.e. there will never be three versions; only a base language with an assumed level of formality, plus one variant. Is this a reasonable rule of thumb? If so, I can hard code the formality settings into my plugin fairly easily.

    It’s a reasonable rule of thumb, at least for these locales. But there might be exceptions in other locales, not sure.

    Plugin Author Tim W

    (@timwhitlock)

    Version now in trunk (2.5.2-dev) includes implied formality plus a new filter loco_locale_formality which may override the formal/informal setting.

    Implied formality works as follows: If for a locale (xx_XX) there is an official WordPress locale xx_XX_formal then the unsuffixed locale is implied informal and DeepL will receive formality=less (and vice versa).

    @zeilbauer I’m marking as resolved as the original question has been answered and improvements made. Please start a new thread if you encounter any issues with the new features.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Deepl api – choose german informell’ is closed to new replies.