Cross locale type / Universal type


We created a custom type to manage some of our css, we call it "Theme".
Every slice have a "Theme" field where we can link one of the existing theme we already created in prismic.

Somehow this "Theme" type is localized too even though it makes no sense, and we have to duplicate all the French's "Themes" to all the other locales in order to be able to link them in the "Theme" field.

Is there any way to create a custom type that can be used in a related field of all locales without having to duplicate it? Something like a cross locale custom type?

Thank you

Hi @jb1,

Thanks for posting, and welcome to the Prismic community!

This is not possible as described. All content is scoped by locale, so, in your case, you would need a theme document for each locale.

We can discuss a few workaround for this usecase.

The first is translating your theme documents to each locale.

You can quickly copy a complete document, with all its content, to another locale with Prismic's native translation features:

You could also look into doing a bulk import to new locales:

This might be a little frustrating, though, if the content is exactly the same, and you need to maintain it in multiple locales.

If you don't want to translate, then, instead of a Content Relationship, you could you a Select field, with the UIDs of your themes as options, and then do a second query in your code to get the theme from your master locale based on the Select field.

I can try to think of other options if these don't work. Let me know what you think, and if you find your own solution.


Ok, we thought of all those options already. I had to make sure we didn't miss something!.
We won't use the "duplicate to other locale", it will be too time consuming.
The select field will be shorter but regular users won't be able to do this. An admin will have to take care of this.

Than you for your answer!

Great! Let me know if you have any other questions.


This issue has been closed as it has been fixed, Flag if it is not the case for you to reopen.