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

No need to set IPhoneResourcePrefix #2611

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/fundamentals/localization.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Localization"
description: "Learn how to localize .NET MAUI app strings, images, and app names."
ms.date: 09/05/2023
ms.date: 11/11/2024
---

# Localization
Expand Down Expand Up @@ -198,14 +198,15 @@ Only two characters are required in the folder name when specifying a top-level

:::image type="content" source="media/localization/images-folder-structure-ios.png" alt-text="Screenshot of the localized folder structure in Visual Studio for images on iOS.":::

<!-- This is required on .NET 7 due to a bug in .NET MAUI, which might be fixed in .NET 8. -->
<!-- This was required in .NET 7 due to a bug in .NET MAUI, which is now allegedly fixed by https://github.com/dotnet/maui/pull/23269
In addition, in your project file you must set the `IPhoneResourcePrefix` build property to the folder that contains the localized image folders:

```xml
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<IPhoneResourcePrefix>Platforms/iOS/Resources</IPhoneResourcePrefix>
</PropertyGroup>
```
-->

If an image isn't present for a particular language, iOS falls back to the default native language folder and loads the image from there.

Expand All @@ -219,7 +220,7 @@ Only two characters are required in the folder name when specifying a top-level

:::image type="content" source="media/localization/images-folder-structure-maccatalyst.png" alt-text="Screenshot of the localized folder structure in Visual Studio for images on MacCatalyst.":::

<!-- This is required on .NET 7 due to a bug in .NET MAUI, which might be fixed in .NET 8. -->
<!-- This was required in .NET 7 due to a bug in .NET MAUI, which is now allegedly fixed by https://github.com/dotnet/maui/pull/23269
In addition, in your project file you must set the `IPhoneResourcePrefix` build property to the folder that contains the localized image folders:

```xml
Expand All @@ -228,6 +229,8 @@ In addition, in your project file you must set the `IPhoneResourcePrefix` build
</PropertyGroup>
```

-->

If an image isn't present for a particular language, Mac Catalyst falls back to the default native language folder and loads the image from there.

### Windows
Expand Down Expand Up @@ -326,14 +329,15 @@ Other keys that you can use to localize app-specific strings are:
- `CFBundleShortVersionString` - specifies the release version number of the app bundle.
- `NSHumanReadableCopyright` - the copyright notice for the app bundle.

<!-- This is required on .NET 7 due to a bug in .NET MAUI, which might be fixed in .NET 8. -->
<!-- This was required in .NET 7 due to a bug in .NET MAUI, which is now allegedly fixed by https://github.com/dotnet/maui/pull/23269
In addition, in your project file you must set the `IPhoneResourcePrefix` build property to the folder that contains the localized folders:

```xml
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<IPhoneResourcePrefix>Platforms/iOS/Resources</IPhoneResourcePrefix>
</PropertyGroup>
```
-->

### Mac Catalyst

Expand Down Expand Up @@ -367,14 +371,15 @@ Other keys that you can use to localize app-specific strings are:
- `CFBundleShortVersionString` - specifies the release version number of the app bundle.
- `NSHumanReadableCopyright` - the copyright notice for the app bundle.

<!-- This is required on .NET 7 due to a bug in .NET MAUI, which might be fixed in .NET 8. -->
<!-- This was required in .NET 7 due to a bug in .NET MAUI, which is now allegedly fixed by https://github.com/dotnet/maui/pull/23269
In addition, in your project file you must set the `IPhoneResourcePrefix` build property to the folder that contains the localized folders:

```xml
<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst'))">
<IPhoneResourcePrefix>Platforms/MacCatalyst/Resources</IPhoneResourcePrefix>
</PropertyGroup>
```
-->

### Windows

Expand Down
Loading