LATW AI Translation for Loco Translate 2.1.2 has 17 actions and 21 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when LATW AI Translation for Loco Translate fires an action
add_action( 'latwlt_admin_menu', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value LATW AI Translation for Loco Translate is about to use
add_filter( 'latwlt_queue_concurrency', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * How many requests to the translation API may be in flight at once. */ apply_filters( 'latwlt_queue_concurrency', 1 ); -
/** * The translations about to be written, before anything is saved. */ apply_filters( 'latwlt_translated_strings', $strings, $translation, $source_strings ); -
/** * Keys added to the `latwltAdmin` JS object. The add-on's script enqueues with * `latwlt-admin-js` as a dependency and reads the same object — no second * one. */ apply_filters( 'latwlt_admin_localize', $latwlt_admin_data ); -
/** * Render controls the core's prompt field cannot offer. */ do_action( 'latwlt_after_prompt_field', $latwlt_prompt_editable, (string) $latwlt_prompt_value ); -
/** * Selectable models, as provider id => (model id => label). */ apply_filters( 'latwlt_allowed_models', $models ); -
/** * Settings of an extension that LATW Cloud owns while connected. */ apply_filters( 'latwlt_cloud_settings', array() ); -
/** * The LATW panel this site pairs with. */ apply_filters( 'latwlt_cloud_url', $url ); -
/** * Build a provider instance for an id the core does not know. */ apply_filters( 'latwlt_create_provider', null, $provider ); -
/** * Append dashboard cards (inside the card grid). */ do_action( 'latwlt_dashboard_cards' ); -
/** * Filter the prompt the plugin ships with. */ apply_filters( 'latwlt_default_prompt', self::DEFAULT_PROMPT ); -
/** * Whether one PO entry is sent for translation. */ apply_filters( 'latwlt_entries_to_translate', !$is_translated, $meta + array('translated' => $is_translated, 'fuzzy' => $is_fuzzy), $po_file, (bool) $force ); -
/** * Whether the full feature set is unlocked. */ apply_filters( 'latwlt_is_pro', false ); -
/** * Model prices per 1K tokens (per 1K characters for machine translation). */ apply_filters( 'latwlt_model_pricing', array_merge(self::LEGACY_PRICING, self::PRICING) ); -
/** * Which providers are plain machine-translation engines. */ apply_filters( 'latwlt_mt_providers', array(self::PROVIDER_GOOGLE_MT, self::PROVIDER_MYMEMORY) ); -
/** * Refuse to queue a file. */ apply_filters( 'latwlt_pre_queue', true, $meta['po_file'], $target_lang, (bool) $force ); -
/** * Whether the prompt may be edited on this site. */ apply_filters( 'latwlt_prompt_editable', false ); -
/** * The credential and model rows rendered on the General tab. */ apply_filters( 'latwlt_provider_fields', $fields ); -
/** * Where each provider's credential and model are stored, as provider id => * [key option, model option]. */ apply_filters( 'latwlt_provider_key_options', $latwlt_key_options ); -
/** * Selectable translation providers, as id => label. */ apply_filters( 'latwlt_providers', $providers ); -
/** * Register settings of your own into the `latwlt_settings` group. */ do_action( 'latwlt_register_settings' ); -
/** * Save the fields of an extension's own tab (or its rows on a core tab). */ do_action( 'latwlt_save_settings', $current_tab ); -
/** * Render an extension's own settings tab. */ do_action( "latwlt_settings_tab_{$latwlt_current_tab}" ); -
/** * Settings tabs, as slug => label, in the order they are shown. */ apply_filters( 'latwlt_settings_tabs', array( 'general' => __('General', 'latw-ai-translation-for-loco-translate'), 'translation' => __('Translation', 'latw-ai-translation-for-loco-translate'), 'advanced' => __('Advanced', 'latw-ai-translation-for-loco-translate'), ) ); -
/** * Add settings of your own to the Translation tab. */ do_action( 'latwlt_settings_translation_tab_end' ); -
/** * Fires once, the first time a job row reaches 'completed' — its * translations are in the PO/MO file by then. */ do_action( 'latwlt_translation_completed', (int) $id ); -
/** * Buttons above the file table (bulk actions). Empty in the core. */ do_action( 'latwlt_translations_table_actions', $latwlt_current_type ); -
/** * Column headers before the core's own (e.g. a bulk checkbox). */ do_action( 'latwlt_translations_table_header', $latwlt_current_type ); -
/** * The matching cell per file row. */ do_action( 'latwlt_translations_table_row', $latwlt_file, $latwlt_current_type, $latwlt_bundle ); -
apply_filters( 'latwlt_translation_prompt', LATWLT_LLM_Provider::get_default_prompt(), '', '' ); -
do_action( 'latwlt_activated' ); -
do_action( 'latwlt_after_init' ); -
do_action( 'latwlt_before_init' ); -
do_action( 'latwlt_deactivated' ); -
do_action( 'latwlt_log', $message, $level, $context ); -
do_action( 'latwlt_modules_loaded' ); -
apply_filters( 'latwlt_prompt_glossary', '', $source_lang, $target_lang ); -
apply_filters( 'latwlt_translations_column_count', 5 );
Generated from LATW AI Translation for Loco Translate's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: