Recent

Author Topic: Beginner's tutorial on localization  (Read 3846 times)

wp

  • Hero Member
  • *****
  • Posts: 13355
Beginner's tutorial on localization
« on: November 27, 2013, 12:30:04 am »
Having seen some questions on practical application of localization in the forum recently I took the time and wrote step-by-step instructions as a wiki tutorial (http://wiki.lazarus.freepascal.org/Step-by-step_instructions_for_creating_multi-language_applications). I hope this is useful to somebody out there.

In addition I'd ask somebody with write permission to post the attached tutorial code in the examples folder of the Lazarus installation.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Beginner's tutorial on localization
« Reply #1 on: November 27, 2013, 07:49:07 am »
@wp thanks a lot; if it doesn't get picked up by laz devs, I assume you know what to do: add it to a bugtracker item so they get notified ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: Beginner's tutorial on localization
« Reply #2 on: November 27, 2013, 07:55:28 am »
Thank you very much for your effort, wp.
Best regards!

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Beginner's tutorial on localization
« Reply #3 on: November 27, 2013, 09:58:44 am »
I always wondered why msgid is value of resourcestring instead of resourcestring name, then can by one main/base po file with default language and all others with translations. In current case there is redundant text in exe resources and all msgid in all translated po files.
I've project with only 2 languages and in that case does not make sense to set i18n.
But maybe I'm wrong. Is it possible to set the translations with out values in resourcestrings ? (only values from po files)

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Beginner's tutorial on localization
« Reply #4 on: November 27, 2013, 12:06:19 pm »
Thanks wp, both for this and the help you have given me recently.

The older localization/translations documents led me down the wrong and a much mor ecomplicated path.

desliem

  • New Member
  • *
  • Posts: 12
Re: Beginner's tutorial on localization
« Reply #5 on: May 18, 2015, 11:42:03 pm »
Having seen some questions on practical application of localization in the forum recently I took the time and wrote step-by-step instructions as a wiki tutorial (http://wiki.lazarus.freepascal.org/Step-by-step_instructions_for_creating_multi-language_applications). I hope this is useful to somebody out there.

In addition I'd ask somebody with write permission to post the attached tutorial code in the examples folder of the Lazarus installation.

You may want to update the tutorial. In Lazarus 1.4.0, the SetDefaultLang procedure has been moved from unit DefaultTranslator to unit LClTranslator. The procedure is mentionned in the section Switching languages.

Thank you for the tutorial.

wp

  • Hero Member
  • *****
  • Posts: 13355
Re: Beginner's tutorial on localization
« Reply #6 on: May 19, 2015, 10:17:25 am »
Thanks for the note, I updated the article accordingly.

BTW: do you know that you can edit wiki articles by yourself? Just register in the wiki, login; then you'll see an "Edit" link which opens the editor for the currently loaded article. Of course, don't vandalize!

 

TinyPortal © 2005-2018