Skip to content

Locale support for directus translations #218

Answered by lumos94
lumos94 asked this question in Q&A
Discussion options

You must be logged in to vote

found a solution! the syntax was wrong. is there any way to update the documentation and add it as an example?

 const filters = {
      translations: {
        _filter: {
          languages_code: {_eq: "es-ES"},
        },
      }
    };

    const items = await getItems<Article>({
      collection: "test_collection",
      params: {
        fields: ['*', 'translations.*'],
        deep: filters,
      },
    });

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
5 replies
@casualmatt
Comment options

@lumos94
Comment options

@casualmatt
Comment options

@lumos94
Comment options

@lumos94
Comment options

Comment options

You must be logged in to vote
3 replies
@Intevel
Comment options

@lumos94
Comment options

@Intevel
Comment options

Answer selected by lumos94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants