Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic localization abilities #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

LucaTNT
Copy link

@LucaTNT LucaTNT commented Oct 11, 2014

I just started using the accidentalbot for an Italian podcast, and I translated it.
So, I thought I would share my localization "system". I also attached the Italian translation.

@@ -7,6 +7,9 @@ var webSocket = require('ws');
var channel = '#atp';
var webAddress = 'http://www.caseyliss.com/showbot';
var TITLE_LIMIT = 75;
var BOT_LANG = 'en';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of hardcoding the language here, you get it from Accept-Language? That way you could serve up different languages to different users from the same running instance depending on their language settings for their browser.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried yet, but does the Accept-Language propagate through IRC?
This little hack of mine only applies to the bot part, not to the web interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants