I’m combining Angular 14 with a legacy ASP.NET Web application and we have static texts in a resource file (.rsx) in a folder outside of Angular.
I need to display those texts in a component’s template (inside Angular). How can I do to achieve that?
2
Answers
I don t think there is a ready to use solution for this, think its best if you provide a dynamic/static generated json that you load in you translation module.
something that looks like this
As mentioned in the comment, it is likely that you need to implement an API to get the resources file’s value and return it as a JSON object/dictionary.
You can refer to
ResourceManager.GetResourceSet(CultureInfo, Boolean, Boolean)
method to retrieve the resource values.For the Angular side, implement the service to call the API.
Caller