|
1 | 1 | # How-to-Change-the-Return-Button-Text-for-.NET-MAUI-NumericEntry-for-a-Specific-Culture-in-iOS |
2 | 2 | This repository contains a sample explaining How to Change the Return Button Text for .NET MAUI NumericEntry for a Specific Culture in iOS |
| 3 | + |
| 4 | +To modify the return button text of the keyboard, follow these steps to initialize localization for the [NumericEntry](https://www.syncfusion.com/maui-controls/maui-numeric-entry) control: |
| 5 | + |
| 6 | +**Step 1: Add a New .resx File** |
| 7 | + |
| 8 | +1. In your project, create a new folder named Resources if it doesn’t already exist. |
| 9 | +2. Right-click on the Resources folder and select Add > New Item.... |
| 10 | +3. Choose Resource File and name it `SfNumericEntry.fr-FR.resx` for French localization. |
| 11 | + |
| 12 | +**Step 2: Add Localization Keys and Values** |
| 13 | + |
| 14 | +1. Open the `SfNumericEntry.fr-FR.resx` file. |
| 15 | +2. In the Name column, add the following keys: return, go, next, done, send, search. |
| 16 | +3. In the Value column, enter the corresponding translated text. |
| 17 | + |
| 18 | +| Return button type | Key | Value | |
| 19 | +| ------ | ------ | ------ | |
| 20 | +| Default | return | retour | |
| 21 | +| Go | go | aller | |
| 22 | +| Done | done | terminé | |
| 23 | +| Next | next | suivant | |
| 24 | +| Search | search | rechercher | |
| 25 | +| Send | send | envoyer | |
| 26 | + |
| 27 | +**Step 3: Configure the Localization for NumericEntry** |
| 28 | + |
| 29 | +To apply the localization, set the `ResourceManager` for `SfNumericEntryResources` in the `App.xaml.cs` file. |
| 30 | + |
| 31 | + |
| 32 | + ```csharp |
| 33 | +namespace NumericEntrySample |
| 34 | +{ |
| 35 | + public partial class App : Application |
| 36 | + { |
| 37 | + public App() |
| 38 | + { |
| 39 | + InitializeComponent(); |
| 40 | + |
| 41 | + // Set the current UI culture |
| 42 | + CultureInfo.CurrentUICulture = new CultureInfo("fr-FR"); |
| 43 | + |
| 44 | + // Initialize the ResourceManager for SfNumericEntry |
| 45 | + SfNumericEntryResources.ResourceManager = new ResourceManager("NumericEntrySample.Resources.SfNumericEntry", Application.Current!.GetType().Assembly); |
| 46 | + } |
| 47 | + |
| 48 | + protected override Window CreateWindow(IActivationState? activationState) |
| 49 | + { |
| 50 | + return new Window(new AppShell()); |
| 51 | + } |
| 52 | + } |
| 53 | +} |
| 54 | + ``` |
| 55 | + |
| 56 | +**Step 4: Initialize NumericEntry control** |
| 57 | + |
| 58 | + |
| 59 | + ``` |
| 60 | +<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
| 61 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
| 62 | + xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" |
| 63 | + x:Class="NumericEntrySample.MainPage"> |
| 64 | +
|
| 65 | + <VerticalStackLayout Spacing="15" Padding="10"> |
| 66 | + <inputs:SfNumericEntry |
| 67 | + HeightRequest="40" |
| 68 | + Background="Lavender"/> |
| 69 | + </VerticalStackLayout> |
| 70 | + |
| 71 | +</ContentPage> |
| 72 | +
|
| 73 | + ``` |
| 74 | + |
| 75 | +**Output** |
| 76 | + |
| 77 | + |
| 78 | +  |
| 79 | + |
| 80 | +[Download the complete sample from GitHub](https://github.com/SyncfusionExamples/How-to-Change-the-Return-Button-Text-for-.NET-MAUI-NumericEntry-for-a-Specific-Culture-in-iOS) |
| 81 | + |
| 82 | +**Conclusion** |
| 83 | + |
| 84 | +Hope you enjoyed learning how to change the return button text for the .NET MAUI NumericEntry control based on a specific culture in an iOS application. This ensures that users see culturally appropriate return button text in the numeric entry control keyboard. |
| 85 | + |
| 86 | +Refer to our [.NET MAUI NumericEntry feature tour](https://www.syncfusion.com/maui-controls/maui-numeric-entry) page to learn about its other groundbreaking feature representations. You can explore our [.NET MAUI NumericEntry documentation](https://help.syncfusion.com/maui/numericentry/getting-started) to understand its features and how to use it. |
| 87 | + |
| 88 | +For current customers, check out our .NET MAUI components from the [License and Downloads](https://www.syncfusion.com/sales/teamlicense) page. If you are new to Syncfusion, try our 30-day [free trial](https://www.syncfusion.com/downloads/maui) to check out our .NET MAUI NumericEntry and other .NET MAUI components. |
| 89 | + |
| 90 | +Please let us know in the following comments section if you have any queries or require clarifications. You can also contact us through our [support forums](https://www.syncfusion.com/forums), [Direct-Trac](https://support.syncfusion.com/create), or [feedback portal](https://www.syncfusion.com/feedback/maui?control=sfnumericentry). We are always happy to assist you! |
| 91 | + |
| 92 | + |
0 commit comments