Replace core translation with this module.

Created on 21 August 2024, 3 months ago

Would it be possible to only use (further develop) this module instead of enabling locale ?
For instance it could override the \Drupal::service('string_translation'); service. So t() works with this module instead of defining a new st() function.

💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Documentation

Created by

🇧🇪Belgium kriboogh

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

Comments & Activities

  • Issue created by @kriboogh
  • 🇧🇪Belgium dieterholvoet Brussels

    This is already possible! You can switch to this mode on the settings page (admin/config/regional/symfony-translation). The differences are explained over there.

  • 🇧🇪Belgium kriboogh

    Ok nice, will check it out. Thanks for the quick reply ;-)

  • 🇧🇪Belgium dieterholvoet Brussels

    The module still has a dependency on the locale module though, since it falls back to it. Core and contrib all use locale for translations, so disabling it and only enabling Symfony Translation would mean that only custom strings defined in translation files would be translated. Correct me if I'm wrong, but that doesn't seem like a realistic situation to me.

  • 🇧🇪Belgium kriboogh

    Yeah I was looking into this, because of some issues we have regarding locale messing up config translations. In my opinion, core shouldn't redefine default config into the default language (if different from EN, but rather store all config in English (source) and use language overrides as translations. Now it just seems like a mess :-) I came across your module when looking into how Symfony does its translations and then wondered why drupal just doesn't do it that way... But I guess locale is too tangled up in core to really leave it out.

  • Status changed to Closed: works as designed 3 months ago
Production build 0.71.5 2024