aksoftware98 / multilanguages

AKSoftware.Localization.MultiLanguages is a package for .NET developers allows them to easily build apps target multiple languages with just few lines of code
MIT License
85 stars 15 forks source link

keeping yml in a folder not inside assembly #42

Closed ISOhelpline closed 1 year ago

ISOhelpline commented 1 year ago

How to keep yml as an external linked resource and not as an imbedded resource That way it will be easy to add more languages without recompiling the app

aksoftware98 commented 1 year ago

Hi @ISOhelpline

Thanks for using the package, and opening this issue, too, actually at the moment, the library doesn't support this, but I will be releasing the feature in the next two days, once it's available in here, I will reply to this issue and close it.

Will keep you updated

Thanks

ISOhelpline commented 1 year ago

Hi @aksoftware98

Any update on this?

aksoftware98 commented 1 year ago

Sorry I haven't worked on that yet, have been very busy, 1st of Feb will release the update

ISOhelpline commented 1 year ago

Waiting for the update....

aksoftware98 commented 1 year ago

Thanks for the reminder, I just dropped a preview version that you can use

AKSoftware.Localization.MultiLanguages 5.9.1 Please upgrade your library to version 5.9.1 And if you are not using Dependency Injection You can refer to this sample file here: Program.cs sample to fetch keys from folder

If you are using dependency injection you can use the newly used method:

// For .NET projects consider the following method
services.AddLanguageContainerFromFolder("Resouces", CultureInfo.GetCultureInfo("en-US")); 

// For Blazor Server
services.AddLanguageContainerFromFolderForBlazorServer("Resouces", CultureInfo.GetCultureInfo("en-US")); 

Keep in mind, the folder of the resources has to be shipped with your project If you want to copy the resources folder for the output directory with every build you can check the following Answer here: https://stackoverflow.com/questions/17742617/copy-entire-directory-to-output-folder-maintaining-the-folder-structure

Thank you for your patience, and for your participation in this cool feature in the library, much appreciated. If you have used it before it would be great if you can share the value this library is adding to your project.

In case you face any issue feel free to reopen this issue, I will be helping straightforward

Thanks, Ahmad