Forum > Translations

Translation of dialog boxes to PT-BR

(1/1)

babycode:
I translated the lazarus dialog boxes from the lclstrconsts.pas file into Português do Brasil. Anyone interested in using it just download the file from the repository: https://github.com/assisdantas/lclstrconsts-ptbr.
(Traduzi as caixas de diálogo do lazarus do arquivo lclstrconsts.pas para o português brasileiro. Quem tiver interesse em utilizá-lo basta baixar o arquivo do repositório)

Follow the steps:

* Create a backup copy of the "lclstrconsts.pas" file present in the Lazarus installation directory (usually C:\lazarus\lcl);
* Copy the translation file from the "pt-br" folder to the LCL directory (replace the file);
* Start Lazarus and go to Tools > Build Lazarus;
* Wait for lazarus to compile and the dialogues will be translated at the end.

wp:
Replacing units by translated versions is not the way the Lazarus translation system works. The minimum requirement to create a Portuguese-only application is to copy the file lclstrconsts.pt_BR.po from the ide/translations folder (in your Lazarus installation) (as well as other pt_BR.po files from other packages) into your project directory and to call TranslateUnitResourceStrings for each very early, e.g. in the initialization section of the main form unit.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var  PODir: String; initialization  PODir := Application.Location;  TranslateUnitResourceStrings('lclstrconsts', PODir + 'lclstrconsts.pt_BR.po');  
See attached demo project.

babycode:
Thanks for the guidance wp didn't know this method.

Navigation

[0] Message Index

Go to full version