Hi,
Thanks for your answer but I think I wasn't clear enough in my initial post.
So imagine the following:
I have a custom Type called "blog post"
This blog post type has a Document Link (Content Relationship) to a secondary custom type called "blog category" that is going to be used for nesting my blog posts in categories in my urls (so category-uid/blog-post-uid)
At the moment, It seems that there is no clear way to retrieve this relationship for alternative languages, let's say we take the example from above we suppose we fetch the "blog post" custom type document, we will get its UID, but also it's category in the french language so we will get something like this
(i've stripped all unecessary things to make the example clearer)
{
"doc": {
"id": "YN8NohIAACIAQjsp",
"uid": "my-custom-blog-post",
"url": "/blog/category-of-the-blog/my-custom-blog-post",
"type": "blog_post",
"lang": "fr-fr",
"alternate_languages": [
{
"id": "YOXJERIAACQAX9Tv",
"uid": "the-post-in-de-ch",
"type": "blog_post",
"lang": "de-ch"
}
],
"data": {
"category": {
"uid": "category-of-the-blog",
"type": "blog_category"
}
}
}
}
So in this example we have a blog post with the uid "my-custom-blog-post" that has the Content Relationship "category" to the custom type -> "blog_category"
And so through the help of the Route Resolver (from slicemachine I may have forgotten to mention that) I'm creating a nested route of a form of :lang/blog/:category/:uid which then creates the "url" response in the example above to make routing faster.
But I don't see (an easy) way to do the same thing for alternate languages, as the uid of the translated category will be different (translated) and so it's not possible without refetching each alternative languages document and get its Content Relationship -> Category -> UID
So for the alternate languages document I am expecting something like: /de-ch/blog/category-of-the-blog-in-de-ch/the-post-in-de-ch
Ideally it would be nice the route resolver from slicemachine -> adds the resolved translated URL to the alternate_languages array, unless there is another way to do so.
Let me know if this explanation was clearer