Recent

Author Topic: Application Translations  (Read 9895 times)

Rayvenhaus

  • Jr. Member
  • **
  • Posts: 70
Application Translations
« on: January 18, 2017, 02:21:48 pm »
I was wondering if this is where one can ask for assistance in converting a .po file into other languages?  If not, can anyone point me where I can go to get assistance in converting my application into other languages?

Thanks in advance!!

lainz

  • Hero Member
  • *****
  • Posts: 4593
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Application Translations
« Reply #1 on: January 18, 2017, 02:25:50 pm »
If you use poedit you can get semi-automatic translations based on suggestions, you click a suggestion and it get's translated to the target language for you, up to 10 suggestions, then you need to restart poedit to get suggestions again. If you got the paid version it's even easier since it has no limit.

Then if you're not sure, you can always send your translation to a native speaker. There are also paid services for translation, search online.

Edit: and of course if your application is open source I'm glad to help you to translate it to spanish.
« Last Edit: January 18, 2017, 02:31:03 pm by lainz »

Rayvenhaus

  • Jr. Member
  • **
  • Posts: 70
Re: Application Translations
« Reply #2 on: January 18, 2017, 02:42:13 pm »
Yes it's open source and I will look at POEdit and see how that goes. As far as the Spanish translation, if you're willing to help, I'll gladly accept your efforts.

Eugene Loza

  • Hero Member
  • *****
  • Posts: 729
    • My games in Pascal
Re: Application Translations
« Reply #3 on: January 18, 2017, 02:54:20 pm »
I think you mean not "convert" a .po file into another language, but to actually translate its content, right?
If you're speaking about a commercial project, then your direction is toward freelance interpreters, which are plenty around the Internet for a vast majority of native languages.
If you're creating a Free (Libre) and Opensource project
(you've answered that question)
I think you should ask for help in this software-related forum. Maybe, create a topic about your project here. As far as I've seen by now FOSS programs have a much wider support for native languages (however, not always trnanslations are of high quality).
I've been using Transifex for some time, and it's relatively user-friendly, automatically exports-imports .po files. Of course, an interpreter would want more power, but it's widely used and has a not-very-limited free version. Many FOSS projects such as FreeDroidRPG and SuperTuxKart use Transifex as far as I know.
« Last Edit: January 18, 2017, 02:56:40 pm by Eugene Loza »
My FOSS games in FreePascal&CastleGameEngine: https://decoherence.itch.io/ (Sources: https://gitlab.com/EugeneLoza)

lainz

  • Hero Member
  • *****
  • Posts: 4593
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Application Translations
« Reply #4 on: January 18, 2017, 03:32:11 pm »
Yes it's open source and I will look at POEdit and see how that goes. As far as the Spanish translation, if you're willing to help, I'll gladly accept your efforts.

Yes, just send me the english .po file, if it's in another language than english, please first translate to english since I don't know another languages.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4520
  • I like bugs.
Re: Application Translations
« Reply #5 on: January 18, 2017, 08:08:49 pm »
Rayvenhaus, I think you asked for instructions. Here are some:
 http://wiki.freepascal.org/Step-by-step_instructions_for_creating_multi-language_applications
 http://wiki.freepascal.org/Translations_/_i18n_/_localizations_for_programs
As usual, Wiki has many competing pages for the same thing.

Actually I tried to do the same thing with the new Laz-Model port. I added DefaultTranslator to units and .po files were generated, but I cannot see the translated strings anywhere.

I never added i18n to an application before. I have only done apps with one language in GUIs, or added translations to apps which already had support for it.
Obviously I missed some detail, but which one?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Application Translations
« Reply #6 on: January 18, 2017, 08:45:20 pm »
@Juha, Here's a tip: Make an <applicationname>.en.po (a copy of the <applicationname>.po) then use PoEdit to copy all the strings over, (as the English 'translation') else Laz Translator won't use the en.po file.

For an Native-language default app you can use the LCLTranslator unit instead of DefaultTranslator and then call in form.create (example is English)
Code: Pascal  [Select][+][-]
  1. SetDefaultLang('en', 'locale', True);
(or whatever your locale folder and native language prefix is) and use 'Language' submenu items to change languages 'on-the'fly' (With SetDefaultLang calls)  You can save the user's choice in a cfg file to autoload at startup.

JSON Editor (https://svn.code.sf.net/p/lazarus-ccr/svn/applications/json_packager/ uses this technique to switch English/Spanish on the fly.  It bundles the .po files in the executable as resources and unpacks them to disk on startup.

DefaultTranslator uses system settings to determine the default language, I think.  I don't know what it does if there's no corresponding po file.
« Last Edit: January 18, 2017, 10:39:32 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4520
  • I like bugs.
Re: Application Translations
« Reply #7 on: January 19, 2017, 10:49:34 am »
Thanks, minesadorada.
The translation started to work with a symlink for the "locale" dir. The exacutable was not in the project dir.
Setting a menu with SetDefaultLang() later may be a good idea.
Please test the new Laz-Model. It is cool!
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018