The language string on my site is en-gb. This is 5 characters so does not fit in the 2 character limit of the language field in the db table push_notifications_tokens. Is the language string an Apple defined value?

Members fund testing for the Drupal project. Drupal Association Learn more


haagendazs’s picture

Assigned: Unassigned » haagendazs

Argh. Thanks for catching that. I am getting the list of languages from the _locale_get_predefined_list function, and somehow assumed that all language codes are 2 characters. I'll provide a patch for this shortly.

johnennew’s picture

Status: Active » Needs review
1.28 KB


Here is a patch suggestion for review for this issue. The longest langage code returned by _locale_get_predefined_list is 11 characters so it extends the language field to this.

Kind regards,

haagendazs’s picture

Status: Needs review » Reviewed & tested by the community

Sorry for the late reply about this. I modified your patch slightly and will release this shortly.

haagendazs’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.