Changeset 14407
- Timestamp:
- 03/27/2025 09:30:34 AM (6 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-bulk-pretranslations/inc/class-deepl.php ¶
r14205 r14407 50 50 } 51 51 52 $options = array( 53 'timeout' => 20, 54 'headers' => array( 55 'Content-Type' => 'application/json', 56 'Authorization' => 'DeepL-Auth-Key ' . $deepl_api_key, 57 ), 58 'body' => wp_json_encode( array( 59 'text' => array( $original->singular ), 60 'target_lang' => $target_lang, 61 'formality' => $this->get_language_formality( $target_lang, $locale->slug ), 62 )), 63 ); 52 64 $deepl_response = wp_remote_post( 53 65 $deepl_url, 54 array( 55 'timeout' => 20, 56 'body' => array( 57 'auth_key' => $deepl_api_key, 58 'text' => $original->singular, 59 'source_lang' => 'EN', 60 'target_lang' => $target_lang, 61 'formality' => $this->get_language_formality( $target_lang, $locale->slug ), 62 ), 63 ), 66 $options 64 67 ); 65 68 if ( is_wp_error( $deepl_response ) ) {
Note: See TracChangeset
for help on using the changeset viewer.