Determines the preferred locale from a request or array. Optionally negotiates
the preferred locale with available locales.
public static preferred ( object | array $request, array $available = null ) : string | ||
$request | object | array | An action or console request object or an array of locales. |
$available | array | A list of locales to negotiate the preferred locale with. |
리턴 | string | The preferred locale in its canonical form (i.e. `'fr_CA'`). |