Can Radzen's Internationalization be executed on the localhost?

#1

Hi,

I am using radzen's community edition (version 2.17.7). I follow the document of " Internationalization" to setup my first multi-language web app.

[https://www.radzen.com/documentation/internationalization/](http://Internationalization i18n)

But it does not work on my Macbook Pro.

I don't understand that I miss any procedures or not. My web app is very simple.

  1. It has only one "button".
  2. I setup two cultures. (en-US & zh-CHT , en-US is my default culture)

According to the tutorial, I only need to modify the file of messages.zh-CHT.xlf.

I follow all of the procedures to build this app. It still cannot work with "multi-language" mode.

Can someone show me how to solve this issue ?

Regards,

Paul Wang

0 Likes

#2

Hi Paul,

Radzen is using Angular i18n which works only when the app was build in production mode - Radzen run button will run the app in debug mode. You can deploy your app to your local IIS to check the localization.

Best Regards,
Vladimir

0 Likes

#3

Hi Vladimir,

I still have the problem for i18n production mode.

My Application Name : test

I create two languages (en-US & zh-CHT) for production.

(1) ./node_modules/.bin/ng build --prod --aot --base-href /Form/en-US/ --output-path=dist/en-US --i18n-file=src/i18n/messages.en-US.xlf --i18n-locale en-US --i18n-format=xlf

(2) ./node_modules/.bin/ng build --prod --aot --base-href /Form/zh-CHT/ --output-path=dist/zh-CHT --i18n-file=src/i18n/messages.zh-CHT.xlf --i18n-locale zh-CHT --i18n-format=xlf

I launch my production mode. ---> http://localhost:8888/Form/en-US/index.html , The web page is lauched at "English" Language.

When I try to launch "Chinese" page. I get the following error message.

# Not Found

The requested URL /Form/zh-CHT/test was not found on this server.

If I type "http://localhost:8888/Form/zh-CHT/index.html". It can display correctly. If I try to switch to "English" page. I also get "Not Found" Error.

Do I miss any steps to build radzen app for i18n. The page tries to find "test".

Where I can modify or find this information ?

Best Regards,

Paul Wang

0 Likes

#4

Hi Paul,

To build localized version of the application is far more complex compared to non localized version. For each language you should have separate Angular application + there is a special code in the .NET Core app to handle localization. Of course all these are implemented out-of-the-box when you deploy the app using Radzen.

Best Regards,
Vladimir

0 Likes

#5

Hi Vladimir,

Thanks for your reply. But I still get the same error. I following the quick video (https://www.radzen.com/documentation/internationalization/) to deploy it. It does not configure any ".NET Core app" on the video. The only difference is that I deploy it as "zip" file. My web server is Apache and Nginx.

  1. I unzip the file (deploy.zip) into my web server.

  2. I connect to my English language version. If I try to switch to "Traditional Chinese", I still get the same error.

Does anyone have the detail procedure to configure it correctly ? I need the detail information or tutorial to solve this issue.

Best Regards,

Paul Wang

0 Likes

#6

Hi,

Unlike manual deploy, when you use Radzen deploy everything will be configured automatically.

I just deployed our sample app (to ZIP and copied to IIS) with English and Chinese localization and switching between languages worked as expected:

Best Regards,
Vladimir

0 Likes

#7

Hi Vladimir,

For your explanation, your demo app can switch language between en-US and zh-CN.

http://localhost/sample/en-US/orders <---> http://localhost/sample/zh-CN/orders

For my case, it always get the error "http://localhost/myApp/en-US/main not found" or "http://localhost/myApp/zh-CHT/main not found" .

I can link "http://localhost/myApp/zh-CHT/index.html" or "http://localhost/myApp/en-US/index.html" directly.

But I cannot link "http://localhost/myApp/en-US/main" or "http://localhost/myApp/zh-CHT/main" directly.

Do I miss any configuration ?

I think that is why I did not get the same result as yours.

How can I solve it ?

0 Likes