How to use the datocms-client.i18n.locale function in datocms-client

To help you get started, we’ve selected a few datocms-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datocms / gatsby-source-datocms / src / createSiteNode.js View on Github external
site.locales.forEach(locale => {
    i18n.locale = locale;

    let node = initNodeFromEntity(siteEntity, locale);

    node = objectAssign(site.toMap(), node);

    delete node.favicon;
    delete node.faviconMetaTags;

    if (site.favicon) {
      node.faviconMetaTags___NODE = createFaviconMetaTagsNode(
        node,
        site,
        createNode
      );
    }