Make locale of a slug reference field selectable

Currently a slug default value is taken from site-wide locale. This does not make sense for Japanese default locale for example (as shown in the attached image) and would be more appropriate to take from English, regardless of the site-wide default locale.

Hello @taro, first of all welcome to Community!

Can you please explain your use case? The title field is translated while the slug is not? And then, how do you fill the translations?

If the slug is not translated while the title is, then it shouldn’t autocomplete, so I guess in your case either the content was in Japanese first and then you added the English translation, or the editors have filled the slug in Japanese. It shouldn’t happen automatically.

Hi Mat, thanks for your greetings and having a look at my query!
My apologies for not being clear, let me try to explain the issue I am facing. It is not about translation of a field. Rather, I would like the “Reference field” of a slug field to be a specific locale of the Reference field - e.g. not site-wide ja version but en version - as a slug should be in English alphabets.

  • a slug field is auto-populated from its “Reference field”

  • when the site-wide language is English (or probably in any latin languages), auto-populated slug works just fine

  • but when the site-wide language is Japanese (or probably any other Asian languages involving two bytes characters), the slug field is not auto-populated

  • basically locale of a “slug” field’s “Reference field” is driven by the site-wide locale configuration

  • but for non-latin languages, it would make more sense for a slug field to reference a latin locale version of the “Reference field” e.g. en.

Does this explain my situation better?
Appreciate any pointers.

oh yes, it makes a lot of sense!

Probably it would be better to be able to pick the reference locale, instead of picking the first one with latin characters.

Right now you could implement this with a plugin, if you want. It could populate the slug field automatically when you populate the English translation, in your case.

You can find a starting point here: Plugin SDK - Introduction - DatoCMS Docs but if you need specific details let me know