Hi Support Team ABP!
ABP Framework version: v7.4.4
UI Type:Angular
Database System: MongoDB
Tiered (for MVC) or Auth Server Separated (for Angular): no
Currently, I am using module web public Razor ASP .Net and running web public normally. However, with localization I implement it by myself and not reuse the server side localization resources.
My team plan to use server side localization like this like: https://docs.abp.io/en/abp/latest/Localization#using-in-a-razor-view-page
Could you please guide me how to integrate server side localization to web public Razor ASP .Net and guide for me step by step?
17 Answer(s)
-
0
hi
This document already explains the steps in detail.
https://docs.abp.io/en/abp/latest/Localization#creating-a-localization-resource
If you get any error, you can continue feedback.
-
0
Hi maliming!
Currently, I have modify the web public module, and now entire of this module is my code. So now I need to implement server side localization resources. in this code
-
0
hi
I don't know your exact code, but you just need to create the resources and localize the translations on the server side, and after that you can use them in web.public, which you can see in a new template project.
If my understanding is wrong, you can share some code to explain your case in detail.
-
0
Hi maliming!
Because entire of web public module is modified, I think I will send you my code,
Please review my code and give your idea
Could you please send me your email? -
0
-
0
Hi maliming!
I sent to your email. -
0
hi
I downloaded your project, can you share some steps or tips?
-
0
Hi maliming!
in my project, we use Language middleware on file src/LogiPlat.Web.Public/Commons/Middlewares/LanguageMiddleware.cs (line 68-69) to fetch language from server
I dont; want to fetch language from server, I want to inject IHtmlLocalizer to my project, please guide me how to do this
-
0
hi
You can inject
IHtmlLocalizer
, I tested, and it works.
-
0
Hi maliming!
let me try and feedback to you.
I want to ask a question
How can I get all current active language on backend then binding to web public? -
0
hi
You can inject
ILanguageProvider
service to get all languages. -
0
Hi maliming!
Thank you very much! let me try and feedback to you. -
0
: )
-
0
Hi maliming!
I used IHtmlLocalizer, But it cannot change language in my page.
-
0
hi
Abp uses an endpoint to change the current language.
https://localhost:44348/Abp/Languages/Switch?culture=vi&uiCulture=vi&returnUrl=%2F
-
0
Hi maliming!
Thank you verymuch -
0
You're welcome.