There are a few error messages reported by the library when an NumberParseException is thrown. For example in
|
if (!static::isViablePhoneNumber($nationalNumber)) { |
|
throw new NumberParseException( |
|
NumberParseException::NOT_A_NUMBER, |
|
'The string supplied did not seem to be a phone number.' |
|
); |
|
} |
The labels I identified are:
'The string supplied was too long to parse.'
'The string supplied did not seem to be a phone number.'
'Missing or invalid default region.'
'Could not interpret numbers after plus-sign.'
'The string supplied is too short to be a phone number.'
'The string supplied is too long to be a phone number.'
'The phone-context valid is invalid.'
'Phone number had an IDD, but after this was not long enough to be a viable phone number.'
'Country calling code supplied was not recognised.'
I'm wondering how one could have translations of these and if this would be a good idea. Is it something that would have to be maintained here, or in a supplementary repo, or should each dependent software manage this itself?
There are a few error messages reported by the library when an
NumberParseExceptionis thrown. For example inlibphonenumber-for-php/src/PhoneNumberUtil.php
Lines 1538 to 1543 in f41acc3
The labels I identified are:
I'm wondering how one could have translations of these and if this would be a good idea. Is it something that would have to be maintained here, or in a supplementary repo, or should each dependent software manage this itself?