{"id":28466613,"url":"https://github.com/locize/resx","last_synced_at":"2025-06-30T23:32:07.249Z","repository":{"id":43557688,"uuid":"106053887","full_name":"locize/resx","owner":"locize","description":"resx2js and js2resx converter resx resource utils","archived":false,"fork":false,"pushed_at":"2023-04-21T09:40:11.000Z","size":479,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T15:02:19.012Z","etag":null,"topics":["js","json","resources","resx","resxconverter","translation"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locize.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-06T22:03:03.000Z","updated_at":"2025-06-27T10:14:22.000Z","dependencies_parsed_at":"2023-12-17T09:44:35.612Z","dependency_job_id":null,"html_url":"https://github.com/locize/resx","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"f804e6f19c00612fd8503a6a6e613741199a3f20"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/locize/resx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fresx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fresx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fresx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fresx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locize","download_url":"https://codeload.github.com/locize/resx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fresx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262842868,"owners_count":23373156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["js","json","resources","resx","resxconverter","translation"],"created_at":"2025-06-07T07:04:52.031Z","updated_at":"2025-06-30T23:32:07.240Z","avatar_url":"https://github.com/locize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![travis](https://img.shields.io/travis/locize/resx.svg)](https://travis-ci.org/locize/resx) [![npm](https://img.shields.io/npm/v/resx.svg)](https://npmjs.org/package/resx)\n\n## Download\n\nThe source is available for download from\n[GitHub](https://github.com/locize/resx/archive/master.zip).\nAlternatively, you can install using npm:\n\n```sh\nnpm install --save resx\n```\n\nYou can then `import` or `require()` resx as normal:\n\n```js\nimport resx from 'resx'\n// or\nconst resx = require('resx')\n\nresx.resx2js(xml, (err, res) =\u003e {})\n```\n\nOr you can direclty `import` or `require()` its functions:\n\n```js\nimport resx2js from 'resx/resx2js'\n// or\nconst resx2js = require('resx/cjs/resx2js')\n```\n\n## Usage\n\n```js\n\nconst xml = `\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003croot\u003e\n  \u003c!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals of this format is to allow a simple XML format\n    that is mostly human readable. The generation and parsing of the\n    various data types are done through the TypeConverter classes\n    associated with the data types.\n\n    Example:\n\n    ... ado.net/XML headers \u0026 schema ...\n    \u003cresheader name=\"resmimetype\"\u003etext/microsoft-resx\u003c/resheader\u003e\n    \u003cresheader name=\"version\"\u003e2.0\u003c/resheader\u003e\n    \u003cresheader name=\"reader\"\u003eSystem.Resources.ResXResourceReader, System.Windows.Forms, ...\u003c/resheader\u003e\n    \u003cresheader name=\"writer\"\u003eSystem.Resources.ResXResourceWriter, System.Windows.Forms, ...\u003c/resheader\u003e\n    \u003cdata name=\"Name1\"\u003e\u003cvalue\u003ethis is my long string\u003c/value\u003e\u003ccomment\u003ethis is a comment\u003c/comment\u003e\u003c/data\u003e\n    \u003cdata name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\"\u003eBlue\u003c/data\u003e\n    \u003cdata name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\"\u003e\n        \u003cvalue\u003e[base64 mime encoded serialized .NET Framework object]\u003c/value\u003e\n    \u003c/data\u003e\n    \u003cdata name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\"\u003e\n        \u003cvalue\u003e[base64 mime encoded string representing a byte array form of the .NET Framework object]\u003c/value\u003e\n        \u003ccomment\u003eThis is a comment\u003c/comment\u003e\n    \u003c/data\u003e\n\n    There are any number of \"resheader\" rows that contain simple\n    name/value pairs.\n\n    Each data row contains a name, and value. The row also contains a\n    type or mimetype. Type corresponds to a .NET class that support\n    text/value conversion through the TypeConverter architecture.\n    Classes that don't support this are serialized and stored with the\n    mimetype set.\n\n    The mimetype is used for serialized objects, and tells the\n    ResXResourceReader how to depersist the object. This is currently not\n    extensible. For a given mimetype the value must be set accordingly:\n\n    Note - application/x-microsoft.net.object.binary.base64 is the format\n    that the ResXResourceWriter will generate, however the reader can\n    read any of the formats listed below.\n\n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array\n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    --\u003e\n  \u003cxsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\"\u003e\n    \u003cxsd:import namespace=\"http://www.w3.org/XML/1998/namespace\"/\u003e\n    \u003cxsd:element name=\"root\" msdata:IsDataSet=\"true\"\u003e\n      \u003cxsd:complexType\u003e\n        \u003cxsd:choice maxOccurs=\"unbounded\"\u003e\n          \u003cxsd:element name=\"metadata\"\u003e\n            \u003cxsd:complexType\u003e\n              \u003cxsd:sequence\u003e\n                \u003cxsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\"/\u003e\n              \u003c/xsd:sequence\u003e\n              \u003cxsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\"/\u003e\n              \u003cxsd:attribute name=\"type\" type=\"xsd:string\"/\u003e\n              \u003cxsd:attribute name=\"mimetype\" type=\"xsd:string\"/\u003e\n              \u003cxsd:attribute ref=\"xml:space\"/\u003e\n            \u003c/xsd:complexType\u003e\n          \u003c/xsd:element\u003e\n          \u003cxsd:element name=\"assembly\"\u003e\n            \u003cxsd:complexType\u003e\n              \u003cxsd:attribute name=\"alias\" type=\"xsd:string\"/\u003e\n              \u003cxsd:attribute name=\"name\" type=\"xsd:string\"/\u003e\n            \u003c/xsd:complexType\u003e\n          \u003c/xsd:element\u003e\n          \u003cxsd:element name=\"data\"\u003e\n            \u003cxsd:complexType\u003e\n              \u003cxsd:sequence\u003e\n                \u003cxsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/\u003e\n                \u003cxsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\"/\u003e\n              \u003c/xsd:sequence\u003e\n              \u003cxsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\"/\u003e\n              \u003cxsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\"/\u003e\n              \u003cxsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\"/\u003e\n              \u003cxsd:attribute ref=\"xml:space\"/\u003e\n            \u003c/xsd:complexType\u003e\n          \u003c/xsd:element\u003e\n          \u003cxsd:element name=\"resheader\"\u003e\n            \u003cxsd:complexType\u003e\n              \u003cxsd:sequence\u003e\n                \u003cxsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\"/\u003e\n              \u003c/xsd:sequence\u003e\n              \u003cxsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/\u003e\n            \u003c/xsd:complexType\u003e\n          \u003c/xsd:element\u003e\n        \u003c/xsd:choice\u003e\n      \u003c/xsd:complexType\u003e\n    \u003c/xsd:element\u003e\n  \u003c/xsd:schema\u003e\n  \u003cresheader name=\"resmimetype\"\u003e\n    \u003cvalue\u003etext/microsoft-resx\u003c/value\u003e\n  \u003c/resheader\u003e\n  \u003cresheader name=\"version\"\u003e\n    \u003cvalue\u003e2.0\u003c/value\u003e\n  \u003c/resheader\u003e\n  \u003cresheader name=\"reader\"\u003e\n    \u003cvalue\u003eSystem.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\u003c/value\u003e\n  \u003c/resheader\u003e\n  \u003cresheader name=\"writer\"\u003e\n    \u003cvalue\u003eSystem.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\u003c/value\u003e\n  \u003c/resheader\u003e\n  \u003cdata name=\"key1\" xml:space=\"preserve\"\u003e\n    \u003cvalue\u003eHello\u003c/value\u003e\n  \u003c/data\u003e\n  \u003cdata name=\"key2\" xml:space=\"preserve\"\u003e\n    \u003cvalue\u003eAn application to manipulate and process resx documents\u003c/value\u003e\n  \u003c/data\u003e\n  \u003cdata name=\"key.nested\" xml:space=\"preserve\"\u003e\n    \u003cvalue\u003eresx Data Manager\u003c/value\u003e\n  \u003c/data\u003e\n\u003c/root\u003e`\n\nconst js = {\n  \"key1\": \"Hello\",\n  \"key2\": \"An application to manipulate and process resx documents\",\n  \"key.nested\": \"resx Data Manager\"\n}\n\n\nimport resx2js from 'resx/resx2js'\nresx2js(xml, (err, res) =\u003e {\n  // res is like js\n})\n\nimport js2resx from 'resx/js2resx'\njs2resx(js, (err, res) =\u003e {\n  // res is like xml\n})\n\n```\n\nOmitting the callback returns a promise\n\n```js\nconst resJs = await resx2js(xml)\nconst resXml = await js2resx(js)\n// or\nresx2js(xml).then((res) =\u003e {})\njs2resx(js).then((res) =\u003e {})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Fresx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocize%2Fresx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Fresx/lists"}