{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/1082","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/1082/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/1082/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/1082/events","html_url":"https://github.com/keystonejs/keystone/issues/1082","id":58320085,"number":1082,"title":"cannot apply multilaunge to keystone","user":{"login":"arthurtalkgoal","id":7088330,"avatar_url":"https://avatars.githubusercontent.com/u/7088330?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurtalkgoal","html_url":"https://github.com/arthurtalkgoal","followers_url":"https://api.github.com/users/arthurtalkgoal/followers","following_url":"https://api.github.com/users/arthurtalkgoal/following{/other_user}","gists_url":"https://api.github.com/users/arthurtalkgoal/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurtalkgoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurtalkgoal/subscriptions","organizations_url":"https://api.github.com/users/arthurtalkgoal/orgs","repos_url":"https://api.github.com/users/arthurtalkgoal/repos","events_url":"https://api.github.com/users/arthurtalkgoal/events{/privacy}","received_events_url":"https://api.github.com/users/arthurtalkgoal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-20T07:52:09Z","updated_at":"2015-06-04T22:30:35Z","closed_at":null,"body":"I searched some config for keystone i18n, namely:\r\nhttps://github.com/keystonejs/keystone/issues/39\r\n\r\nBut I not sure how to enable my fields and keystone support multi lang yet, the follow returns error - i18n not defined if I put the codes in my keystone.js\r\n\r\n```\r\ni18n.configure({\r\n  locales:['zh-TW', 'zh-CN', 'en'],\r\n  defaultLocale: 'en',\r\n});\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/comments/109072990","html_url":"https://github.com/keystonejs/keystone/issues/1082#issuecomment-109072990","issue_url":"https://api.github.com/repos/keystonejs/keystone/issues/1082","id":109072990,"user":{"login":"mikeblakeney","id":2646906,"avatar_url":"https://avatars.githubusercontent.com/u/2646906?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeblakeney","html_url":"https://github.com/mikeblakeney","followers_url":"https://api.github.com/users/mikeblakeney/followers","following_url":"https://api.github.com/users/mikeblakeney/following{/other_user}","gists_url":"https://api.github.com/users/mikeblakeney/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeblakeney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeblakeney/subscriptions","organizations_url":"https://api.github.com/users/mikeblakeney/orgs","repos_url":"https://api.github.com/users/mikeblakeney/repos","events_url":"https://api.github.com/users/mikeblakeney/events{/privacy}","received_events_url":"https://api.github.com/users/mikeblakeney/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T22:30:35Z","updated_at":"2015-06-04T22:30:35Z","body":"@morenoh149 So, I've been able to get i18next-node working with keystone.  \r\n\r\n```javascript\r\ni18n.init({\r\n\tlng: 'en-US',\r\n\tdebug: true\r\n},function() {\r\n\tkeystone.set('i18n', i18n);\r\n\r\n\t// Load your project's Models\r\n\tkeystone.import('models');\r\n\r\n\t// Load your project's Routes\r\n\r\n\tkeystone.set('routes', require('./routes'));\r\n\r\n\t// Setup common locals for your emails. The following are required by Keystone's\r\n\t// default email templates, you may remove them if you're using your own.\r\n\r\n\t// Configure the navigation bar in Keystone's Admin UI\r\n\tkeystone.set('nav', {\r\n\t\t'users': 'users'\r\n\t});\r\n\r\n\t// Start Keystone to connect to your database and initialise the web server\r\n\tkeystone.start();\r\n});\r\n```\r\n\r\nnow you can grab i18next with\r\n```javascript\r\nvar i18n = keystone.get('i18n');\r\n```\r\n\r\nand translate something like a model's label:\r\n\r\n```javascript\r\nvar Audio = new keystone.List('Audio');\r\nvar i18n = keystone.get('i18n');\r\n\r\nAudio.add({\r\n\tname: { label: i18n.t('model.audio.name'), type: Types.Text, initial: true, required: true, index: true },\r\n  status: { label: i18n.t('model.audio.status'),type: Types.Select, options: 'draft, published, archived', default: 'draft' },\r\n  createdAt: { label: i18n.t('model.audio.createdAt'),type: Date, default: Date.now },\r\n  publishedAt: {label: i18n.t('model.audio.publishedAt'), type: Date},\r\n  description:{ label: i18n.t('model.audio.description'), type: Types.Html, wysiwyg: true, height: 300 }\r\n});\r\n```\r\n\r\nHope this helps!"}}