Articles in this section
Category / Section

How to Change the Return Button Text for .NET MAUI Numeric Entry in iOS?

3 mins read

This article outlines how to change the return button text for the .NET MAUI Numeric Entry control on iOS. The return button text can be customized by utilizing localization support.

To modify the return button text of the keyboard, follow these steps to initialize localization for the Numeric Entry control:

Step 1: Add a New .resx File

  1. In the project, create a new folder named Resources if it doesn’t already exist.
  2. Right-click on the Resources folder and select Add > New Item…
  3. Choose Resource File and name it SfNumericEntry.fr-FR.resx for French localization.

Step 2: Add Localization Keys and Values

  1. Open the SfNumericEntry.fr-FR.resx file.
  2. In the Name column, add the following keys: return, go, next, done, send, search.
  3. In the Value column, enter the corresponding translated text.
Return button type Key Value
Default return retour
Go go aller
Done done terminé
Next next suivant
Search search rechercher
Send send envoyer

Step 3: Configure the Localization for NumericEntry

To apply the localization, set the ResourceManager for SfNumericEntryResources in the App.xaml.cs file.

namespace NumericEntrySample
{
   public partial class App : Application
   {
       public App()
       {
           InitializeComponent();

           // Set the current UI culture
           CultureInfo.CurrentUICulture = new CultureInfo("fr-FR");

           // Initialize the ResourceManager for SfNumericEntry
           SfNumericEntryResources.ResourceManager = new ResourceManager("NumericEntrySample.Resources.SfNumericEntry", Application.Current!.GetType().Assembly);
       }

       protected override Window CreateWindow(IActivationState? activationState)
       {
           return new Window(new AppShell());
       }
   }
}

Step 4: Initialize Numeric Entry control

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
            x:Class="NumericEntrySample.MainPage">

   <VerticalStackLayout Spacing="15" Padding="10">
       <inputs:SfNumericEntry 
               HeightRequest="40" 
               Background="Lavender"/>
   </VerticalStackLayout>
   
</ContentPage>

Output

NumericEntryLocalizationGIF.gif

Download the complete sample from GitHub

Conclusion

Hope you enjoyed learning how to change the return button text for the .NET MAUI Numeric Entry control in an iOS application. This ensures that users see culturally appropriate return button text in the numeric entry control keyboard.

Refer to our .NET MAUI Numeric Entry feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Numeric Entry documentation to understand its features and how to use it.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our .NET MAUI Numeric Entry and other .NET MAUI components.

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, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied