Open Closed

Languages in Web.Public #6444


User avatar
0
datdv1 created

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?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

17 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    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?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    liming.ma@volosoft.com

    Please make your project as simple as possible.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    Hi maliming! I sent to your email.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I downloaded your project, can you share some steps or tips?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can inject IHtmlLocalizer, I tested, and it works.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    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?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can inject ILanguageProvider service to get all languages.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILanguageProvider.cs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    Hi maliming! Thank you very much! let me try and feedback to you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    Hi maliming! I used IHtmlLocalizer, But it cannot change language in my page.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Abp uses an endpoint to change the current language.

    https://localhost:44348/Abp/Languages/Switch?culture=vi&uiCulture=vi&returnUrl=%2F
    

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    datdv1 created

    Hi maliming! Thank you verymuch

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You're welcome.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.