Pro tips > Manage draft/published state by locale

    Manage draft/published state by locale

    DatoCMS natively supports record localization, but with one limitation: you cannot publish the record on a by-locale basis. So the whole record, with all the translations, is either draft or published.

    This limitation might be fine for many people but not for everyone. If you need a finer control there are two workarounds that can help you.

    Use a boolean to manage the draft/published state

    The easier approach is to add a translated boolean field that you can use to mark a translation as published. Then you move the draft/published filtering logic of your frontend to this boolean field, rather than leveraging the native one of DatoCMS.

    This approach has the limit that the content can either be draft or published, so when you need to update the content and maybe you need a review before publishing you lose that "updated" state.

    Use links to granularly manage draft/published state

    A more powerful but more complex approach is to create two models, one with the actual translated content and another one that acts as a "master record" where all the translations are linked.

    With this approach you have one non-translated model that has just a title and a multi-link field (and other fields that might not need translation), and another model with all the translated fields.

    Each time you want to add a record you create the master record and then you create one linked translated record per locale, picking each time the locale that you want to create.

    With this approach you can still leverage the draft/published system of DatoCMS and have the granularity per locale.

    You can try this project starter to see an example:

    Next.js multilingual blog with per-locale publishing
    Next.js multilingual blog with per-locale publishing
    Try the full-fledged DatoCMS demo project in minutes.
    Deploy the demo project