Possible to filter nodes by translation?

Created on 9 August 2022, almost 2 years ago
Updated 11 April 2023, about 1 year ago

Hello,

Is there currently a way to filter nodes by translation?

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada SamirMtl

    HI @jmolivas
    Thanks for your module it was helpful for my personal project,
    I have figured out a solution to make the module translatable, basically, I implemented 2 new producers in the ContentTypeSchemaExtension that accept the language parameters, so the GraphQl would be :

    query ($path: String!, $language: String!){
      nodeByPathLang(path: $path, language: $language) {
        ... on NodeArticle {
          __typename          
          id         
          title          
          path        
          tempKeyWorldMeta          
          summary{         
            value          
          }         
          author {           
            displayName
          }          
          body {
            processed         
          }          
          status         
          created        
        }      
      }    
    }
    

    That means big changes in the code, and non-backward compatibilities, maybe I missing something, but I didn't find a way to implement a new ContentTypeLangSchemaExtension class that accepts lang parameters, I have an error "ArticleNode type already declared"
    It would be helpful if I have some guidance for that,
    I'm on slack, a direct chat will be more effective

  • @samirmtl opened merge request.
  • Assigned to AlMunnings
  • πŸ‡¦πŸ‡ΊAustralia AlMunnings Melbourne

    In 2.x we van now filter content with views.
    But it would be nice to have language it in the router also.

    I'll work on this with 2.x.

  • πŸ‡¦πŸ‡ΊAustralia AlMunnings Melbourne

    Added langcode filter to route() query, this ticket is considered fixed for 2.x

  • Status changed to Fixed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia AlMunnings Melbourne
  • Status changed to Fixed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia AlMunnings Melbourne

    2.x beta2+

Production build 0.69.0 2024