Closed faresayyad closed 2 years ago
Do you have the folder "LocalizationResources" exists? if not create it and retry.
Yes it was created. the issue exist.
I mean in the server "hosting" side :)
Oh, It seems working fine now after adding the folder.
Good to know it is working now! Closing this issue since it is solved :)
It seems that the same issue appeared again, the folder exists in the production.
Is there any solution or do you have an idea?
unfortunately I am fully occupied, and can't afford time for github nowadays :(
Any PR are welcome :)
@faresayyad, I can't reproduce your issue, can you share your project startup? and have you seen the samples projects?
Yes sure,
Well, now I can better understand your problem! Before I explain the solution I recommend to read the docs about XLocalizer with RESX files:
RESX files do not support editing at runtime! So if you do not want to fill them manually, start localization setup based on XML or DB, then export the resources to RESX files.
If you want to use RESX files, either create them manually or :
// add xml resource provider
services.AddSingleton<IXResourceProvider, XmlResourceProvider>();
// add translation service services.AddHttpClient<ITranslator, MyMemoryTranslateService>();
2. Run your application and make sure that all translations are done properly.
_Next steps are optional_
3. Export the resources from [XML to RESX](https://docs.ziyad.info/en/XLocalizer/v1.0/export-xml-to-resx.md)
4. Switch to RESX resource files by removing the XML resource provider and translation service setup from startup.
Read more in the [best practice and recommendations page](https://docs.ziyad.info/en/XLocalizer/v1.0/best-practice.md) page will help.
But i already have the Resx file for Arabic and I fill them manually
what is the build action of the resource files? (right click and see properties)
Did you tested with different build action settings?
I am getting an error in the event viewer. every time I switch from English to Arabic
Category: XLocalizer.Resx.ResxResourceProvider EventId: 0 SpanId: 0045c129f6cb0af8 TraceId: 8363e0583dfeb1894b13492b134b631c ParentId: 0000000000000000 RequestId: 8000457b-0000-ed00-b63f-84710c7967bb RequestPath: /ar/Aboutus ActionId: 3f0a219e-baf9-426f-909d-f0ae59dd2874 ActionName: MP.Web.Controllers.HomeController.AboutUs (MP.Web)
Could not find the resource "MP.Web.LocalizationResources.LocSource.resources" among the resources "" embedded in the assembly "MP.Web", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.
Do you have any idea what it's about.?