This commit is contained in:
Elie Bariche 2024-04-10 00:06:00 -04:00
Родитель 1326a6d9f7
Коммит e2c620c6e2
3 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -162,6 +162,7 @@
"Udemy",
"UNOB",
"uitest",
"upri",
"userprofile",
"winui",
"xhdpi",

Просмотреть файл

@ -0,0 +1,24 @@
---
uid: Uno.Features.StringResourceTrimming
---
# String Resource Trimming
String resource trimming is an optional feature used to reduce the final payload size of an Uno Platform application by removing unused localization languages throughout the app.
This feature is currently available for WebAssembly projects.
## Using String Resource Trimming
To enable resources trimming, you need to declare which culture(s) your application uses. For example, in your csproj add:
```xml
<ItemGroup>
<UnoSupportedLanguage Include="en-US" />
<UnoSupportedLanguage Include="fr-CA" />
</ItemGroup>
```
You do not need to include parent cultures (`en` and `fr` in the previous example), they are automatically kept because they may be used as a fallback.
Make sure to update [Uno.Wasm.Bootstrap](https://www.nuget.org/packages/Uno.Wasm.Bootstrap) to the latest 7.0.x or 8.0.x version.

Просмотреть файл

@ -238,6 +238,8 @@
href: guides/profiling-applications.md
- name: IL Linker for WebAssembly
href: xref:uno.articles.features.illinker
- name: Working with String Resource Trimming
href: features/upri-trimming.md
- name: Working with XAML Trimming
href: features/resources-trimming.md