You can localize your Xcode projects into other languages easily using the Auto Localize app, thereby rapidly increasing the audience for your iOS, macOS, watchOS, tvOS and visionOS applications.
In the project editor, select the project name under Project, and click Info. Under Localizations, click the Add button (+), then choose a language and region combination from the pop-up menu.
You can also use string catalogs to localize your projects. To add a string catalog to your project, choose File > New > File. In the sheet that appears, select the platform, enter string into the filter field, select String Catalog, and click Next. In the dialog that appears, accept the default name Localizable, choose a location, and click Create.
Regardless of the method you use for localization, you can export all localizable items in your project in XCLOC (Xcode Localization Catalog) format using the exporting localizations process.
In the Project navigator, select the project, then choose Product > Export Localizations. In the dialog that appears, enter a folder name, choose a location, choose the localizations, and click Export.
The magic begins from this point onwards. You can now easily localize the XCLOC files you've exported using Auto Localize.
Open the Auto Localize app and create a new project. Give your project a suitable name. Set the default language value to the language your project is developed.
Open the automatic localization screen by clicking on the "Localize" button on the toolbar. All you have to do on this screen is to start the translation process by pressing the "Start" button. The application will localize all items in the XCLOC files using Open AI's most advanced GPT models.
After the auto localization process is finished, you can import localized XCLOC files back into the project using Xcode. In the Project navigator, select the project, then choose Product > Import Localizations. Import the localized XCLOC files by choosing one by one.
If you prefer, you have the option to import the XCLOC files in bulk rather than one by one by generating an XCLOC import shell script. To do this, right-click on the project container and select the "Generate XCLOC Import Script" option from the menu. After selecting this option, you will be prompted to choose the Xcode project file to which the XCLOC files will be imported. Then, select the folder where the shell script will be created. Shell script will be created under choosen folder.
Before running the shell script, please remember to grant the necessary permissions by using the following command in the terminal application.
chmod a+x importXCLOCs.sh