Translating strings?

Created on 5 July 2023, almost 2 years ago

Problem/Motivation

First of all, thanks for the great module; it's really useful!

But can I ask if there is any way to translate the text strings I use for Join Word, Text Before and Text After?

Thanks is advance for any help or advice you can give with this!

✨ Feature request
Status

Active

Version

3.0

Component

Miscellaneous

Created by

πŸ‡¦πŸ‡ΊAustralia Andrew.Macpherson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Andrew.Macpherson
  • πŸ‡¦πŸ‡ΊAustralia Andrew.Macpherson

    Hello again! Actually, I worked out how to translate the 'before' and 'after' strings, by overriding the module template with |trans … but how do I translate the 'Join Word'? Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    Hello Andrew!

    Apologies for not addressing this… two years ago.

    If there is any text in templates that is not using |t or |trans we very much welcome issue fork merge requests or patches (or just pointing out the places where this is needed).

    For the bigger problem of translating the join word and other text that you are able to enter, now we are in the realm of translating configuration β†’ , which on the one hand is supposed to work if we have well-defined config schema files β†’ β€” which we do not have, so that is where we should start.

    I will warn however that unfortunately there is a core issue preventing this field display configuration from being easily translateable: πŸ› Entity view/form mode formatter/widget settings have no translation UI Needs review

    And once that is finally in, there will probably be additional hoops for InOtherWords, which is kind of extreme in its complexity of field display configuration.

    Right now, if you are willing to override a FieldFormatter you could do a hack, and wrap the configuration output in t() functions or $this->t() method, and values you use will start showing up in the collected strings that can be translated. Just be careful not to include anything truly dynamic (field values) in there.

Production build 0.71.5 2024