- Merge request !2Issue #3035977: Rendered HTML Output doesnt respect activeLanguage completely β (Open) created by johnzzon
- π¦πΉAustria d.steindl Vienna
Same, patch from #39 solves the issue β Thanks!
We had the problem, that the UI translations were rendered in the language negotiated by Drupal --> so always German. - First commit to issue fork.
- last update
over 1 year ago Composer require-dev failure - πΊπ¦Ukraine HitchShock Ukraine
Reroll the MR and make a patch for it.
- First commit to issue fork.
- last update
over 1 year ago Composer require-dev failure - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require-dev failure - πͺπΈSpain fjgarlin
I'm just doing some light work related to #3190024: Problem with test dependencies when testing issue forks β .
- π¦πΉAustria drunken monkey Vienna, Austria
@fjgarlin: Thanks a lot for your work on that!
However, please do such work in π (Try to) fix the GitLab CI RTBC in the future, itβs quite unrelated to this ticket. - πͺπΈSpain fjgarlin
@drunken-monkey 100% youβre right, apologies. I was meant to undo the changes but totally forgot. My bad.
I arrived at this issue following the related ones and just wanted to prove something (which I did) in the related issues.
Iβll undo my commits Monday first thing (away from computer right now).
- last update
over 1 year ago Composer require-dev failure - π¦πΉAustria drunken monkey Vienna, Austria
#3380219-2: Rendering is not changing the current content and string translation language β is a duplicate that contains a patch with a different approach, not needing a new service class (which Iβd count as a big plus). Please try it out and see whether this doesnβt also resolve this problem for you.
In either case, though, we still need a regression test for this.
- First commit to issue fork.
- Merge request !152Update languages during rendering using approach from #3380219 β (Open) created by bgreco
I created a new branch with the patch from π Rendering is not changing the current content and string translation language Closed: duplicate that doesn't create a new service. I haven't been able to figure out how to write a test for it though.
bgreco β changed the visibility of the branch 3035977-change-language-existing-services to hidden.
After some additional testing, I've found that the approach in this issue (creating a new language negotiator) works better than the approach from π Rendering is not changing the current content and string translation language Closed: duplicate .
The patch from the other issue fixes config and string translations, but entity references are still rendered in the request language. (Specifically - in layout builder, non-translatable custom blocks that reference translatable entities.) The branch from this issue is more complete and fixes all three - config, string, and entity translations.
- π©πͺGermany hchonov πͺπΊπ©πͺπ§π¬
Uploading a static patch of the MR:
- π©πͺGermany hchonov πͺπΊπ©πͺπ§π¬
Re-based MR and uploading a static patch.
- First commit to issue fork.
- π©π°Denmark ressa Copenhagen
Sorry about the noise, I just wanted to remove two modules from composer.json, which I think should not be there, and failed ...
- π©π°Denmark ressa Copenhagen
Just a tip that I managed to get it to work in Search API Solr, and how to:
- Index translated labels in rendered content using the patch in π Rendering is not changing the current content and string translation language Closed: duplicate
- Set up "Language (with fallback)" correctly in a View
I have posted more details in the other issue, and updated the MR.
- π©π°Denmark ressa Copenhagen
GitLab is not doing so well in this issue, it looks like it's stuck, and can't create a new branch with the latest code ...
Anyway, I was wrong about my previous comment, the patch in this issue works. I mixed up the two patches (I thought that 2.patch was in fact 237...)
I am attaching an updated patch.
- π©π°Denmark ressa Copenhagen
I think this patch may be a bit closer to match dev.
- π©π°Denmark ressa Copenhagen
Just an observation: The default language in my installation is English (under
/en
), with Danish as the other language, without language prefix (under/
) like this:- Add Danish language in an existing English installation
- Open "URL language detection configuration" (
/admin/config/regional/language/detection/url
) - Update "English (en) path prefix (Default language)" to
en
- Remove
da
under "Danish" and click Save - Get message about "The prefix may only be left blank for the selected detection fallback language β ."
- Open link in new window and set "Language" to
Danish
- Go back to "URL language detection configuration" which can now be saved
The default language is now Danish at
example.com
(English is underexample.com/en
) and I get the text "Velkommen!" on the front page.From Use URL language detection configuration? β
It mostly works, but sometimes, the system somehow gets stuck in its old ways, and only English labels get indexed ... I tried many things like clearing cache, rebuilding Solr index, etc., but this is what seems to work:
Open the edit form for a node under Danish (
/node/259/edit
), and see English translated field names. If I then clear caches, Drupal "wakes up" and realizes there is a default language (/en
), but the fallback language in the current page is Danish. The fields are now rendered in Danish, and now, when I index, the correct translated field labels are used in the rendered HTML fields, in the Solr index content.