How to change the language code in Youtube-Plugin

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
changer4 Offline
Junior Member
Posts: 1
Joined: Sep 2011
Reputation: 0
Post: #1
Hello guys,

i haven't seen any option to change the language code in the youtube plugin nor the region area to search in. So i changed the code from

in YouTubeCore.py in line 169 from

link = "http://gdata.youtube.com/feeds/api/videos?q=%s&safeSearch=%s&start-index=%s&max-results=%s" % ( urllib.quote_plus(query), safe_search, start_index, per_page)

to

link = "http://gdata.youtube.com/feeds/api/videos?q=%s&safeSearch=%s&start-index=%s&lr=de&max-results=%s" % ( urllib.quote_plus(query), safe_search, start_index, per_page)

lr=Language code according api in ISO 639-1

and it work fine to me. It would be nice, if the plugin would have some language packages or at least the language code for the search in the addon.xml for an easier change.

Great job to the plugin anyway. Smile
find quote