{"action":"created","issue":{"url":"https://api.github.com/repos/SUI-Components/rosetta/issues/17","repository_url":"https://api.github.com/repos/SUI-Components/rosetta","labels_url":"https://api.github.com/repos/SUI-Components/rosetta/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/SUI-Components/rosetta/issues/17/comments","events_url":"https://api.github.com/repos/SUI-Components/rosetta/issues/17/events","html_url":"https://github.com/SUI-Components/rosetta/issues/17","id":151413097,"number":17,"title":"Cargar solo textos de 1 idioma","user":{"login":"julianmartinezmansell","id":11867732,"avatar_url":"https://avatars.githubusercontent.com/u/11867732?v=3","gravatar_id":"","url":"https://api.github.com/users/julianmartinezmansell","html_url":"https://github.com/julianmartinezmansell","followers_url":"https://api.github.com/users/julianmartinezmansell/followers","following_url":"https://api.github.com/users/julianmartinezmansell/following{/other_user}","gists_url":"https://api.github.com/users/julianmartinezmansell/gists{/gist_id}","starred_url":"https://api.github.com/users/julianmartinezmansell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianmartinezmansell/subscriptions","organizations_url":"https://api.github.com/users/julianmartinezmansell/orgs","repos_url":"https://api.github.com/users/julianmartinezmansell/repos","events_url":"https://api.github.com/users/julianmartinezmansell/events{/privacy}","received_events_url":"https://api.github.com/users/julianmartinezmansell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T15:19:14Z","updated_at":"2016-04-28T10:03:12Z","closed_at":null,"body":"Hola, es posible usar Polyglot y Rosetta para hacer una webapp isomorphica pero que solo se cargue la ficha de un idioma, y que no se tenga que cargar del webpack TODOS los idiomas y hagan la app pesada?\r\n\r\nGracias.\r\n\r\nQue opinion tienes de otras librerias como estas?\r\nhttps://github.com/i18next/react-i18next\r\nhttps://github.com/l20n/l20n.js\r\nhttps://github.com/alexdrel/i18n-react\r\n"},"comment":{"url":"https://api.github.com/repos/SUI-Components/rosetta/issues/comments/215374811","html_url":"https://github.com/SUI-Components/rosetta/issues/17#issuecomment-215374811","issue_url":"https://api.github.com/repos/SUI-Components/rosetta/issues/17","id":215374811,"user":{"login":"carlosvillu","id":179462,"avatar_url":"https://avatars.githubusercontent.com/u/179462?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosvillu","html_url":"https://github.com/carlosvillu","followers_url":"https://api.github.com/users/carlosvillu/followers","following_url":"https://api.github.com/users/carlosvillu/following{/other_user}","gists_url":"https://api.github.com/users/carlosvillu/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosvillu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosvillu/subscriptions","organizations_url":"https://api.github.com/users/carlosvillu/orgs","repos_url":"https://api.github.com/users/carlosvillu/repos","events_url":"https://api.github.com/users/carlosvillu/events{/privacy}","received_events_url":"https://api.github.com/users/carlosvillu/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T10:03:11Z","updated_at":"2016-04-28T10:03:11Z","body":"Hola Julian,\r\n\r\nRealmente Rosetta no se encarga de como adquirir el diccionario de idiomas. Para no enviar todos los idiomas en el bundle que contiene tu aplicación, puedes hacer en el punto de entrada de tu App que antes de inicializar Rosetta hagas una llamada Ajax a un JSON que tengas en un CDN o en tu server, para traerte el diccionario. Una vez que lo tengas, ganas en que puedes cambiar de idioma tu app sin tener que hacer nuevas peticiones al server.\r\n\r\nOtra cosa que puedes hacer es un función para \"wrappear\" el cambio de cultura que devuelva una promesa:\r\n\r\n```js\r\nconst changeCulture = (culture, i18n) => {\r\n  return axios.get('URL_PARA_MI_CULTURA').then(dicc => {\r\n    i18n.languages = dicc\r\n    i18n.culture = culture\r\n  })\r\n}\r\n```\r\n\r\nEn este último caso dicc es un JSON que solo contiene la cultura que hayas pedido.\r\n\r\nSobre mi oponión de las otras librerías, realmente me parecen muy buenos proyectos, pero a nosotros en Schibsted no nos acababa de cerrar, por que tenemos varios proyectos legacy que ya están usando sus propias librerías de I18N  que nada tienen que ver con React. La idea fue crear algo que fácilmente nos permitiera integrar todas esas soluciones con React. Y por eso usamos Rosetta y sus adaptadores.\r\n\r\nC."}}