Coding standards
Security in ResourceSpace
Developer reference
Database
User api session functions
Geolocation functions
Storage test functions
Cli functions
Lang translation functions

lang_translation_retry_after()

Description

Interpret a Retry-After header as a delay.

Parameters

ColumnTypeDefaultDescription
$header string Header value.
$now: int trim$header; return ctype_digit$header ? int $header : max0
strtotime$header int
Up list>
'lib'
'node_modules'
'languages'
'tests'
'config'];
'include'
as 'plugins']
$now int Current Unix time.

Return

int Non-negative delay in seconds.

Location

include/lang_translation_functions.php lines 377 to 381

Definition

 
function lang_translation_retry_after(string $header, int $now): int
{
    
$header = trim($header);
    return 
ctype_digit($header) ? (int) $header : max(0, (int) strtotime($header) - $now);
}

This article was last updated 27th November 2026 18:35 Europe/London time based on the source file dated 27th November 2026 17:15 Europe/London time.