2

I have made a standalone tool which i start with the command-line to see possible updates in the database to use the actual translations, and a program to compare an existing database with a new installation. Now you can use the sql-files in the localization-files only with a new installation and i use the new po-files to find possible updates after the normal upgrading in CiviCRM. The translated strings in the database are now never upgraded with new Transifex translations. After making the programs i looked how extensions work, but this is not really an extension for users but may be something for the system administrator. Are there other kinds of extensions?

1

If the tool is command-line only, it probably shouldn't be an extension.

If you need to bootstrap CiviCRM from the command line, and you can presume that the cv tool is in the path, and your tool is PHP-based, you can add the line:

eval(`cv php:boot`);

or just:

cv php:boot --level=classloader

This should give you the ability to call CiviCRM classes without creating an extension.

| improve this answer | |
  • Thank you for your answer. It is command-line online, but I think exentions can also be used as a way to distribute the program (with upgrades) if i created a project in Github and manage to add that to the civicrm.org/extensions. – HanV Mar 9 at 9:29
  • This is an interesting use case! I would discuss it with the extension team lead, Allen. His username is @twomice on chat.civicrm.org, I would join the ~extensions channel. – Jon G - Megaphone Tech Mar 9 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.