Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle multi-lingual sites/content/fields #9

Closed
PeteDuncanson opened this issue Aug 29, 2018 · 2 comments
Closed

How to handle multi-lingual sites/content/fields #9

PeteDuncanson opened this issue Aug 29, 2018 · 2 comments

Comments

@PeteDuncanson
Copy link
Contributor

Multi-lingual can be done in a number of different ways and at some point its going to crop up about how this could support it.

  • Vorto, should be an easy one, it has all the values stored as JSON per field so we can just send all that down the wire?
  • By domain (See Do we need to worry about domains? #8), if we lock down by domain then we would only return that
  • Dictionary items, do we return these as a collection once and your frontend has to do the swapping out or do we do this for you within GraphQL?
@rasmusjp
Copy link
Collaborator

At first I also thougt Vorto would be an easy one, but thinking about it, it might actually not be that easy anyway, since it can wrap any property editor.

Simple text string would be easy enough but, lets say I've wrapped a MNTP, which data do you expect to be returned? I've expect that I'll be able to select single fields on the content that's been picked like I can if the editor wasn't wrapped by Vorto.

If we return the raw JSON you need to do multiple queries to get the content, since it will only contain the ids.

Implementing a GraphQLValueResolver could be a solution to this, but then we'll need to dynamically generate "VortoGraphTypes" for each data type, so the Schema knows what data we're wrapping. That's not possible with the code today, but I might be able to hack something together that allows this (can see this might be a necessity for other property editors as well).

By domain should be quite easy (see reply in #8).

Dictionary items could(should?) be exposed as a field and maybe even with a way to select by key/keys.
I'm not sure how you would do the swapping out within GraphQL.

@rasmusjp
Copy link
Collaborator

rasmusjp commented Nov 6, 2019

With the latest code for Umbraco 8 you can pass in a culture argument for each field to get back the content a specific variation

@rasmusjp rasmusjp closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants