title: MongoDB and i18n
body: <p>I would like to model an internationalized collection in MongoDB using Mongoose ODM. It just needs to store a String (name) in three languages.</p>
  
  <p>How would you model that Schema? Ive thought on something like this:</p>
  
  <pre><code>    _id: ObjectID(...),
      name: {
          en: 'Ten',
          es: 'Diez',
          fr: 'Dix'
      }
  </code></pre>
  
  <p>Is there any way of using an enumeration to indicate the language code, instead of hardcoding them into the Mongoose Schema? I would also appreciate any general tips on how to approach the internationalization of a collection in MongoDB.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I will be finally using mongoose-i18n plugin: <a href="https://github.com/elrolito/mongoose-i18n" rel="nofollow">https://github.com/elrolito/mongoose-i18n</a></p>