ygoe / TxTranslation

Tx Translation & Localisation for .NET and WPF
GNU General Public License v3.0
28 stars 12 forks source link

Add LoadFromStream() void #12

Open Anapher opened 7 years ago

Anapher commented 7 years ago

Move most of the body of LoadFromEmbeddedResource() into a new void which just accepts a stream and loads the definitions. LoadFromEmbeddedResource() calls LoadFromStream() after the resource stream was received. This adds another abstraction layer, all data can be represented as a stream so it will be possible to load the translation through a networkstream, a http response stream, a custom resource stream, etc.

The actual reason why I need this void is that I keep all my resources in a different assembly; LoadFromEmbeddedResource() does not allow me to specifiy the assembly, it just uses the calling assembly.

Just something I want to add: I was hugely surprised when I found this repository on my way searching a good translation library. You don't only make it very easy to create a translation but you also provide solutions for things like plural forms etc. It's a shame that this repository hasn't got 1000 stars yet. From now on I will actively use it in all my new projects.