- Issue created by @cedricl
- Status changed to Needs review
9 months ago 12:33pm 22 March 2024 - 🇧🇪Belgium cedricl
Added it as a seperate module, since not all sites have multiple languages and therefor don't need this field. The availableLanguages field has a language and url field, but can be extended if needed.
- 🇫🇮Finland vermario
One possible improvement would be to add this to the node interface instead of individual bundles.
would this be something like what happens in graphql_compose_metatags?
- First commit to issue fork.
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
I like this. I also like the idea of expanding the generalness of languages on the site.
Possibly:
- Add a LanguageCode emum (or similar)
- Add languages to info query
- Add (translations) as a field to translatable entities.
- Add an interface to translatable entities to introduce the new field
- Make that return an array of the enums
- Alter Languages.code to use enum value.I might stab at this a bit in another MR
-
almunnings →
committed a2072f19 on 2.1.x
Issue #3432965: Available languages field for Nodes
-
almunnings →
committed a2072f19 on 2.1.x
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
I uh, did some things.
Check out dev, should be there :)
I didn't add it to the NodeInterface, as you can enable and disable translations per bundle.I also pulled back some schema if a site is not multi lingual, eg no need for langcode queries on nodes etc.
Shape of data should be:
node(id: "ccc6baa9-1545-4332-ac48-daedb146dd6a", langcode: "en") { ... on NodeInterface { title langcode { id } } ... on NodePage { translations { title langcode { id } url } } }
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Changing `url` to `path` to match parent entity pattern.
-
almunnings →
committed 5e5ac012 on 2.1.x
Issue #3432965: Change url to path
-
almunnings →
committed 5e5ac012 on 2.1.x
-
almunnings →
committed 296618ae on 2.1.x
Issue #3432965: Update path description
-
almunnings →
committed 296618ae on 2.1.x
- Status changed to Fixed
9 months ago 10:56pm 10 April 2024 - 🇦🇺Australia almunnings Melbourne, 🇦🇺
As it's merged, marking as fixed. Will release into beta 2 in prep for RC.
- Status changed to Fixed
9 months ago 11:11pm 11 April 2024