Skip to content
Pavel Veselý edited this page Jun 12, 2023 · 1 revision

How LocoMat Works

LocoMat is an application designed to automate and simplify the localization process for Blazor Razor components in applications built with Radzen Blazor Studio. This section provides an overview of how LocoMat works and its core functionalities.

Overview

LocoMat leverages a combination of file processing, translation APIs, and scaffolding techniques to streamline the localization of Blazor Razor components. By following a set of predefined commands and options, developers can automate resource file generation, translation, exclusion of specific files, and more.

Core Functionalities

Localization

LocoMat starts by parsing the .razor and .razor.cs files in the Blazor application and generating resource files. These resource files contain the strings that need to be localized within the components.

Translation

Once the resource files are generated, LocoMat offers a translation feature. Developers can specify target languages and provide an email address to utilize the Translator API for automatic translation. LocoMat interfaces with the Translator API to translate the strings within the resource files to the desired languages.

Scaffolding

One of the key features of LocoMat is the scaffolding functionality. It simplifies the localization of Radzen.Blazor components by automatically generating the necessary scaffolding code. This code sets up the infrastructure to enable localization for Radzen.Blazor components, saving developers time and effort.

Backup and Restoration

To ensure data safety, LocoMat creates backups of modified files during the localization process. These backups are stored in a zip file in the ./LocalizerBackup folder. LocoMat's restoration command allows developers to revert the changes made during localization by replacing the modified files with the original files from the most recent backup archive.


Please note that LocoMat is an evolving project, and while it has been tested and used successfully, there may still be some bugs or areas for improvement. The community is encouraged to contribute to the project and help make LocoMat even more reliable and robust.

Clone this wiki locally