Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
klausi, do you have some thoughts on how to handle langcode/translation during data fetching?
no, i have ignored that so far
klausi, so far, we have one $langcode parameter and try to apply it for everything that is translatable. But I'm wondering whether it wouldn't be better to move to some more explicit variant, ala node:en:title - as sometimes you might not want to apply the langcode everywhere possible
klausi, e.g. consider, node:field_reference:entity:title:value - you might want to translate entity 1, but not entity 2 ?
Should probably figure out how to do this within Typed Data API Enhancements. Could just always use the current user's language, but allow that to be overridden by a data filter for situations like when you want to send mail in the recipient's language.
Comments
Comment #2
fagoComment #3
dasjoComment #4
TR CreditAttribution: TR commentedShould probably figure out how to do this within Typed Data API Enhancements. Could just always use the current user's language, but allow that to be overridden by a data filter for situations like when you want to send mail in the recipient's language.
Comment #5
fagoWhen discussed with fubhy, we had the idea of supporting @syntax for transformers like that. So we could have entity@languag('de').field etc. ?
Comment #6
TR CreditAttribution: TR commented