GeoIP Language Selection
Every time a player joins your server, they are assigned a language that SourceMod will use for translations. SourceMod does this by using the same language that the player installed with Steam. There are two drawbacks to this method:
- SourceMod can only support the same languages that Steam supports. It contains some languages that can't always be used on players (Latvian, Lithuanian, etc).
- Many players install Steam using the default language (English) regardless of their understanding.
This plugin will automatically assign a language to a player based on which country they join from. It works
with SourceMod's method, meaning that it only acts on players using the default language of Steam. If a player prefers another language, they are given that option as well.
Installation:
Extract the contents of the *.zip to your SourceMod directory.
Adding New Languages:
When adding a new language, it's important to use the English name of the language. You can find a list of language codes
here. We will use Greek as an example.
Add the language to
sourcemod/ configs/ languages.cfg:
Code:
"Languages"
{
"en" "English"
"el" "Greek"
}
Then you can begin
translating as usual. All players from Greece will now be automatically using these translations.
Commands:- !language - Display the language selection menu.
- !language <name> - Directly change your language.
Notes:- You should use the latest GeoIP database with this plugin.
- This plugin supports automatic updates via Updater.
- Credit to thetwistedpanda & Leonardo as I borrowed some clientprefs/menu code from their plugins.
Changelog:
Quote:
GeoIP Language Selection 1.3.0
- Fixed Chinese & Portuguese not being correctly assigned.
- Added language forward for plugins.
- Country-Language assignment can now be configured.
- Several performance improvements.
GeoIP Language Selection 1.2.0
- Added support for automatic updates via Updater.
- Made clientprefs optional.
- Removed colours in chat notifications.
- Internal code changes and clean up.
GeoIP Language Selection 1.1.0
- Added language selection menu
- Initial release
|