1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed helperTwitterLanguage missing languages

Discussion in 'Resolved Bug Reports' started by rellect, May 3, 2014.

  1. rellect

    rellect Well-Known Member

    The helperTwitterLanguage returns the language code for the twitter share button.
    The problem is that this function is limited for a specific languages:
    PHP:
    case 'en':
    case 
    'fr':
    case 
    'de':
    case 
    'it':
    case 
    'es':
    case 
    'ko':
    case 
    'ja':
        return 
    $lang;
    There are more languages supported for the twitter button.
    I use he-IL as the language code but the button still in english instead hebrew.

    In any case, this function isn't really necessary. Twitter automatically uses the first two chars as the language. So `data-lang="he-IL"` would still show it as hebrew, there is no real need to cut it into `data-lang="he"`. If the language isn't recognized by twitter, it automatically fallback to english.
     
    Last edited: May 3, 2014
    Adam Howard likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    I've changed this. Interestingly, it didn't fallback properly before, which is why this code was written.
     

Share This Page