crazydevman / mute-profanity

XBMC add-on used to mute profanity
GNU General Public License v3.0
33 stars 14 forks source link

Multilingual support #34

Open gabriellluz opened 6 years ago

gabriellluz commented 6 years ago

Hi, I'd like to create a filter for my own language. Can I write a filter for Portuguese?

crazydevman commented 6 years ago

Yes, but right now the code is hard coded to look for a file called "filter.txt". The simplest way to do it is just to overwrite that file with your own filter file. However, that doesn't help anyone else that speaks portuguese that might want to use your filter file as well. I honestly don't know enough about multilingual support within plugins to know how to use a different filter file based on the user's language settings.

Let me know if you have any questions.

gabriellluz commented 6 years ago

Hi. To start, I'd create a file called "filter_ptbr.txt" and the main file would be "filter_enus.txt". There are some Kodi addons that work with multilingual files. It shouldn't be hard (it's easy for me to say, I'm not a programmer/coder). Also, user could choose the language. It doesn't have to be automatically selected. We can choose the option if you'd like to.

crazydevman commented 6 years ago

OK, so I'm just trying to understand what you're trying to do, you're not really interested in just getting your specific filter setup for your server, but you're talking about an update to the plugin where the user specifies their language, and based on that setting the code chooses the right filter file ("filter_ptbr.txt" instead of "filter_enus.txt") based on that setting. Am I understanding this correctly?

gabriellluz commented 6 years ago

Yes. Exactly! 👍