Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for resource text files (*.restext) #499

Open
ishanpranav opened this issue Oct 3, 2022 · 3 comments
Open

Add support for resource text files (*.restext) #499

ishanpranav opened this issue Oct 3, 2022 · 3 comments

Comments

@ishanpranav
Copy link

Is your feature request related to a problem? Please describe.
Some developers use resource text files instead of RESX. Resgen.exe supports this, but I'm not able to find any source code or API aside from the StronglyTypedResourceBuilder class.

Describe the solution you'd like
If *.restext support doesn't already exist, we can add a TextResourceReader implementation of IResourceReader, then use this to add *.restext support. In the process, we will have generalized the code to any IResourceReader, giving us future support for other formats like Portable Objects (*.po).

Example TextResourceReader.cs
TextResourceReader.cs.txt

@tom-englert
Copy link
Collaborator

  • It would also need a text writer
  • Can you add a sample project using localized strings from text resources?

@ishanpranav
Copy link
Author

ishanpranav commented Oct 3, 2022

Hi Tom,
Do you mean create a new project, or find existing use cases? I can do the former, but as for the latter, it's certainly not a widely used feature. Here's an example from the .NET project itself and a sample repository I made: ishanpranav/restext. The project includes the reader and writer, basically mirroring the design of their RESX counterparts.

@tom-englert
Copy link
Collaborator

Something like this, but with localization.
Without localized strings RXRM does not make too much sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants