Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net5 Lozalization does not work #4514

Closed
iosub opened this issue Nov 13, 2020 · 7 comments
Closed

Net5 Lozalization does not work #4514

iosub opened this issue Nov 13, 2020 · 7 comments
Labels
kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@iosub
Copy link
Contributor

iosub commented Nov 13, 2020

changing the Culture does not work on Net5
string Lan = "es-ES";
CultureInfo.CurrentUICulture = new CultureInfo(Lan);
CultureInfo.CurrentCulture = new CultureInfo(Lan);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Lan);
Thread.CurrentThread.CurrentCulture = new CultureInfo(Lan);

it allways display in IV Format so the DateFormat does not change and the Resource is allways in EN

Use the project included, run in Net2
Steps to reproduce
Net2

Now Change to Net5
Ne5

I have add a Sample Proyect
App1.zip

@jeromelaban jeromelaban transferred this issue from unoplatform/Uno.Wasm.Bootstrap Nov 13, 2020
@jeromelaban
Copy link
Member

Thanks for the issue !

This is not known, we'll look into it!

@jeromelaban jeromelaban added kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools labels Nov 13, 2020
@iosub
Copy link
Contributor Author

iosub commented Nov 25, 2020

hi,

I have found a way to made localization to work

I have add on wasm
<WasmShellEnableNetCoreICU>true</WasmShellEnableNetCoreICU>
and in the LinkerConfig
<assembly fullname=" System.Globalization" />

now the localization works

Uno.UI.WebAssembly ver 3.4.0-dev.131
Uno.Wasm.Bootstrap 2.0.0-dev.97

@jeromelaban
Copy link
Member

Indeed it works, but it creates a memory corruption, see dotnet/runtime#45224.

@iosub
Copy link
Contributor Author

iosub commented Dec 1, 2020

Hi, any update on this?

@jeromelaban
Copy link
Member

It should work a lot better with the uno bootstrapper 2.0.0-dev.115. Can you try and let us know ? You should not need <WasmShellEnableNetCoreICU>true</WasmShellEnableNetCoreICU> anymore.

@iosub
Copy link
Contributor Author

iosub commented Dec 1, 2020

I have just try it, and now it works without adding <WasmShellEnableNetCoreICU>true</WasmShellEnableNetCoreICU>

and <assembly fullname=" System.Globalization" />

Great!

@jeromelaban
Copy link
Member

Excellent! I'll this issue then as it was fixed by unoplatform/Uno.Wasm.Bootstrap#314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
Development

No branches or pull requests

2 participants