How to translate (internationalize, localize) application?

前端 未结 4 1893
一生所求
一生所求 2020-12-03 12:54

I need to translate an application on delphi. Now all strings in interface on Russian. What are the tools for fast find, parcing all pas\'es for string constants?

H

4条回答
  •  广开言路
    2020-12-03 13:19

    Firstly I'd recommend to move all localizable string constants into the resource string sections within their unit files. I.e.

    raise Exception.Create('Error: что-то пошло не так (in Russian language)');
    

    will be converted to

    resourcestring
      rsSomeErrorMessage = 'Error: что-то пошло не так (in Russian language)';
    ...
    raise Exception.Create(rsSomeErrorMessage);
    

    More about Resource Strings.

    This process can be accelerated by using the corespondent Delphi IDE refactoring command, or with third-party utilities like as ModelMaker Tools.

    Then you can use any available localizer to translate or even internationalize your program. I'd recommend my Delphi localizer - it's free.

提交回复
热议问题