Kodi Community Forum

Full Version: How to change the language code in Youtube-Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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