How to create localized entries from code?

Perhaps the best way to handle is below.

  1. Create entries for Default and Required locales.
  2. Once the locale entries are done update the entries with strapi query method as below.
strapi.db.query('api::car.car').update({
                where: { id: item.id },
                data: {
                  [{ id: 1, locale: 'ar-SA' }],
                },
              });