Localizable asp.net core + reactjs application

bruno.almeida

I have a asp.net core web application. My application has some reactjs components, that runs client side.

In my asp.net core views, i use IViewLocalizer to localize my pages and it works just fine.

I have found some projects like react-localization to handle this on reactjs. To use it, I need to do one of the following:

  1. In my view create an object with my resources and give it to react-localization
  2. Create an endpoint that return my resources, call it inside reactjs component and give it to react-localization

My question is, what is the best approach to bring localization to reactjs components?

bruno.almeida

When i posted this question, i had a simple react application with less than ten resources. I chose the number one option, in my view create an object with my resources and give it to react because it is a more simple solution.

On another big react project, i chose the number two option: create an endpoint that return my resources and call it inside reactjs. It is a bit more complex, but all logic is inside reactjs and the html does not have a giant script object with all resources.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Path to LocalAppData in ASP.Net Core application

分類Dev

.NET application (WinForms) depending on ASP.NET Core server

分類Dev

How to submit a file to an ASP.NET Core application

分類Dev

OpenCover for ASP.Net Core application running on IIS Express

分類Dev

ngrok and https tunnel for asp.net core application

分類Dev

How to handle multiple SPA application in ASP.NET Core

分類Dev

Run async code during startup in a ASP.Net Core application

分類Dev

.NET CoreとASP.NET Core

分類Dev

Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application

分類Dev

How to host the basic ASP.NET Core 2 WebAPI application on IIS

分類Dev

HTTP Error 502.5 - Process Failure in ASP.NET Core 2.1 application

分類Dev

ASP.Net Core application service only listening to Port 5000 on Ubuntu

分類Dev

ASP.NET Core Fetch POST FormData()application / x-www-form-urlencoded

分類Dev

How to decrypt .AspNetCore.Identity.Application cookie in ASP.NET Core 3.0?

分類Dev

Download file from ASP.NET Core api from Blazor client application

分類Dev

ASP.Net Core Razor Pages application not binding to property within model

分類Dev

I'm getting an DirectoryNotFoundException error after published an blazor assembly application ASP.NET CORE hosted in IIS

分類Dev

Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

分類Dev

Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

分類Dev

In ASP.NET CORE application EF Core library do not return new inserted record's ID from database?

分類Dev

ASP.NET Core ToHtmlString

分類Dev

Cookieless ASP.NET Core

分類Dev

Application State (ASP.NET) または Singleton (ASP.NET Core) はどの程度安全ですか?

分類Dev

Asp.Net Core React + Reduxチュートリアル、またはReact、React + Redux、ReactJs.netとは何ですか?

分類Dev

ASP.NET Core 3.0で.AspNetCore.Identity.Application Cookieを復号化する方法は?

分類Dev

Removing ASP.NET_SessionId from an ASP.NET application

分類Dev

Windows Authentication in .net Core 2.1 application

分類Dev

Debug .net core application deployed on local IIS?

分類Dev

Asp.NET Core + ReactJs-認証情報を保存する正しい方法は何ですか?

Related 関連記事

  1. 1

    Path to LocalAppData in ASP.Net Core application

  2. 2

    .NET application (WinForms) depending on ASP.NET Core server

  3. 3

    How to submit a file to an ASP.NET Core application

  4. 4

    OpenCover for ASP.Net Core application running on IIS Express

  5. 5

    ngrok and https tunnel for asp.net core application

  6. 6

    How to handle multiple SPA application in ASP.NET Core

  7. 7

    Run async code during startup in a ASP.Net Core application

  8. 8

    .NET CoreとASP.NET Core

  9. 9

    Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application

  10. 10

    How to host the basic ASP.NET Core 2 WebAPI application on IIS

  11. 11

    HTTP Error 502.5 - Process Failure in ASP.NET Core 2.1 application

  12. 12

    ASP.Net Core application service only listening to Port 5000 on Ubuntu

  13. 13

    ASP.NET Core Fetch POST FormData()application / x-www-form-urlencoded

  14. 14

    How to decrypt .AspNetCore.Identity.Application cookie in ASP.NET Core 3.0?

  15. 15

    Download file from ASP.NET Core api from Blazor client application

  16. 16

    ASP.Net Core Razor Pages application not binding to property within model

  17. 17

    I'm getting an DirectoryNotFoundException error after published an blazor assembly application ASP.NET CORE hosted in IIS

  18. 18

    Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

  19. 19

    Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

  20. 20

    In ASP.NET CORE application EF Core library do not return new inserted record's ID from database?

  21. 21

    ASP.NET Core ToHtmlString

  22. 22

    Cookieless ASP.NET Core

  23. 23

    Application State (ASP.NET) または Singleton (ASP.NET Core) はどの程度安全ですか?

  24. 24

    Asp.Net Core React + Reduxチュートリアル、またはReact、React + Redux、ReactJs.netとは何ですか?

  25. 25

    ASP.NET Core 3.0で.AspNetCore.Identity.Application Cookieを復号化する方法は?

  26. 26

    Removing ASP.NET_SessionId from an ASP.NET application

  27. 27

    Windows Authentication in .net Core 2.1 application

  28. 28

    Debug .net core application deployed on local IIS?

  29. 29

    Asp.NET Core + ReactJs-認証情報を保存する正しい方法は何ですか?

ホットタグ

アーカイブ