Skip to content

Localization via satellite assemblies doesn't work for android when the app built in debug mode. #4470

@nevse

Description

@nevse

Description

If I run app in debug mode dotnet build -t:Run -f:net6.0-android it doesn't show translated message. For dotnet build -t:Run -f:net6.0-android -c:Release it does.
Project to reproduce - https://github.com/nevse/Maui-Tests-Localization1
debugVsRelease

Steps to Reproduce

  1. create app dotnet new maui -n HumanaizerTests
  2. add references
<ItemGroup>
        <PackageReference Include="Humanizer.Core" Version="2.14.1" />
        <PackageReference Include="Humanizer.Core.de" Version="2.14.1" /> 
</ItemGroup>
  1. change culture to de and use Humanizer to read data localization resources
CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("de");

CounterLabel.Text = DateTime.UtcNow.AddHours(-2).Humanize();
  1. run the app in debug dotnet build -t:Run -f net6.0-android and release mode dotnet build -t:Run -f:net6.0-android -c:Release

Version with bug

Preview 12 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-localizationLocalization and globalization issuesexternalpartnerIssue or Request from a partner teampartner/androidIssues for the Android SDKplatform/androids/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions