Creating/Adding languages to Standalone Ajax Chat

Having a question about translating phpBB 3.3? Want to discuss and collaborate with people currently translating phpBB 3.3? Here would be the correct place to do so.
Registered User
Posts: 261
Joined: Wed Jul 05, 2023 2:34 pm

Creating/Adding languages to Standalone Ajax Chat

Post by Aevik »

This is actually not the proper place for this topic - however the extensions support forum is also not the proper place -
given that standalone Ajax Chat is not an extension. Also, the actual Ajax Chat support topic has clearly been inactive for years,
and is gathering dust and cobwebs.

In any case..

For every language in Ajax Chat - there are at least 3 files required to make the language function in the chatroom.


we translated de.php and de.js into Icelandic (Íslenska)..
edited config.php to include 'is', in the langAvailable array, and 'is'=>'Íslenska', in the langNames array, then uploaded all 3 files
to their respective directories - and "Íslenska" then appeared in the language dropdown menu, but created an error when selected.
XML Parsing Error: no element found
Location: ..path to/chat/?lang=is
Line Number 1, Column 1:
But — "Line Number 1, Column 1" of which file(?)
any php file will have <?php as line number 1.
all js language files have /* as line 1.

This is rather important as we do have some users based in Iceland, Latvia, and Lithuania, so these languages must also be added.
Unfortunately - support for Ajax Chat (in any form) is non-existant for the foreseeable future.

Thanks in advance!

config.php file :

Code: Select all

// Available languages:
$config['contentEncoding'] = 'UTF-8';
$config['sourceEncoding'] = 'UTF-8';
$config['langAvailable'] = array(
// Default language:
$config['contentEncoding'] = 'UTF-8';
$config['sourceEncoding'] = 'UTF-8';
$config['langDefault'] = 'de';
// Language names (each languge code in available languages must have a display name assigned here):
$config['langNames'] = array(
	'de'=>'Deutsch', 'en'=>'English', 'cy'=>'Cymraeg', 'nl'=>'Nederlands', 'sv'=> 'Svenska', 'no'=>'Norsk', 'da'=>'Dansk', 'is'=>'Íslenska', 'fi'=>'Suomi', 
	'et'=>'Eesti', 'fr'=>'Français', 'it'=>'Italiano', 'ca'=>'Català', 'cz'=>'Česky', 'pl'=> 'Polski', 'el'=>'Ελληνικα', 'uk'=>'Українська'

is.php file :

Code: Select all

 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license Modified MIT License
 * @link

$lang = array();
$lang['title'] = 'Ajax Chat';
$lang['userName'] = 'Notandanafn';
$lang['password'] = 'Aðgangsorð';
$lang['login'] = 'Innskráning';
$lang['logout'] = 'Útskráning';
$lang['channel'] = 'Rás';
$lang['style'] = 'Andrúmsloft';
$lang['language'] = 'Tungumál';
$lang['inputLineBreak'] = 'Press SHIFT+ENTER to input a line break';
$lang['messageSubmit'] = 'Send';
$lang['registeredUsers'] = 'Skráðir notendur';
$lang['onlineUsers'] = 'Tengdir notendur';
$lang['toggleAutoScroll'] = 'Autoscroll on/off';
$lang['toggleAudio'] = 'Sound on/off';
$lang['toggleHelp'] = 'Show/hide help';
$lang['toggleSettings'] = 'Show/hide settings';
$lang['toggleOnlineList'] = 'Show/hide online list';
$lang['bbCodeLabelBold'] = 'b';
$lang['bbCodeLabelItalic'] = 'i';
$lang['bbCodeLabelUnderline'] = 'u';
$lang['bbCodeLabelQuote'] = 'Tilvitnun';
$lang['bbCodeLabelCode'] = 'Kóða';
$lang['bbCodeLabelURL'] = 'URL';
$lang['bbCodeLabelImg'] = 'Image';
$lang['bbCodeLabelColor'] = 'Litur leturgerðar';
$lang['bbCodeLabelEmoticon'] = 'Emoticons';
$lang['bbCodeTitleBold'] = 'Feitletraður texti: [b]texti[/b]';
$lang['bbCodeTitleItalic'] = 'Skáletraður texti: [i]texti[/i]';
$lang['bbCodeTitleUnderline'] = 'Undirstrika texta: [u]texti[/u]';
$lang['bbCodeTitleQuote'] = 'Texti tilboðs:  eða';
$lang['bbCodeTitleCode'] = 'Birting kóða: kóða;
$lang['bbCodeTitleURL'] = 'Setja inn slóð: [url][/url] or [url=]text[/url]';
$lang['bbCodeTitleImg'] = 'Setja inn mynd: [img][/img]';
$lang['bbCodeTitleColor'] = 'Litur leturgerðar: texti;
$lang['bbCodeTitleEmoticon'] = 'Emoticons list';
$lang['help'] = 'Hjálpa';
$lang['helpItemDescJoin'] = 'Tengjast rás:';
$lang['helpItemCodeJoin'] = '/Tengja rás-nafn';
$lang['helpItemDescJoinCreate'] = 'Búðu til sérherbergi (Aðeins skráðir notendur):';
$lang['helpItemCodeJoinCreate'] = '/Tengja';
$lang['helpItemDescInvite'] = 'Bjóddu einhverjum (Til dæmis til í sérherbergi):';
$lang['helpItemCodeInvite'] = '/Bjóða Notandanafn';
$lang['helpItemDescUninvite'] = 'Afturkalla boðið:';
$lang['helpItemCodeUninvite'] = '/Hætta við boð Notandanafn';
$lang['helpItemDescLogout'] = 'Útskráning úr spjalli:';
$lang['helpItemCodeLogout'] = '/Hætta';
$lang['helpItemDescPrivateMessage'] = 'Einkaskilaboð:';
$lang['helpItemCodePrivateMessage'] = '/Skilaboð Notandanafn Texti';
$lang['helpItemDescQueryOpen'] = 'Opna einkarás:';
$lang['helpItemCodeQueryOpen'] = '/Fyrirspurn Notandanafn';
$lang['helpItemDescQueryClose'] = 'Einkarás lokað:';
$lang['helpItemCodeQueryClose'] = '/Fyrirspurn';
$lang['helpItemDescAction'] = 'Lýsa aðgerð:';
$lang['helpItemCodeAction'] = '/Aðgerð Texti';
$lang['helpItemDescDescribe'] = 'Lýstu aðgerð í einkaskilaboðum:';
$lang['helpItemCodeDescribe'] = '/Lýsa Notandanafn Texti';
$lang['helpItemDescIgnore'] = 'Hunsa/Þiggja Skilaboð frá notandi:';
$lang['helpItemCodeIgnore'] = '/Hunsa Notandanafn';
$lang['helpItemDescIgnoreList'] = 'Listi yfir hunsaða notendur:';
$lang['helpItemCodeIgnoreList'] = '/ignore';
$lang['helpItemDescWhereis'] = 'Display user channel:';
$lang['helpItemCodeWhereis'] = '/whereis Username';
$lang['helpItemDescKick'] = 'Banna notanda (Aðeins stjórnendur):';
$lang['helpItemCodeKick'] = '/Banna Notandanafn [Minutes banned]';
$lang['helpItemDescUnban'] = 'Aftur-banna notanda (Aðeins stjórnendur):';
$lang['helpItemCodeUnban'] = '/unban Notandanafn';
$lang['helpItemDescBans'] = 'Listi yfir bannaða notendur (Aðeins stjórnendur):';
$lang['helpItemCodeBans'] = '/bans';
$lang['helpItemDescWhois'] = 'Sýna notanda IP (Aðeins stjórnendur):';
$lang['helpItemCodeWhois'] = '/whois Notandanafn';
$lang['helpItemDescWho'] = 'Birta lista yfir tengda notendur:';
$lang['helpItemCodeWho'] = '/who [Heiti rásar]';
$lang['helpItemDescList'] = 'Birta lista yfir tiltækar rásir:';
$lang['helpItemCodeList'] = '/list';
$lang['helpItemDescRoll'] = 'Kasta teningum:';
$lang['helpItemCodeRoll'] = '/roll [nummer]d[sider]';
$lang['helpItemDescNick'] = 'Change username:';
$lang['helpItemCodeNick'] = '/nick Username';
$lang['settings'] = 'Settings';
$lang['settingsBBCode'] = 'Enable BBCode:';
$lang['settingsBBCodeImages'] = 'Enable image BBCode:';
$lang['settingsBBCodeColors'] = 'Enable font color BBCode:';
$lang['settingsHyperLinks'] = 'Enable hyperlinks:';
$lang['settingsLineBreaks'] = 'Enable line breaks:';
$lang['settingsEmoticons'] = 'Enable emoticons:';
$lang['settingsAutoFocus'] = 'Automatically set the focus on the input field:';
$lang['settingsMaxMessages'] = 'Maximum number of messages in the chatlist:'
$lang['settingsWordWrap'] = 'Enable wrapping of long words:';
$lang['settingsMaxWordLength'] = 'Maximum length of a word before it gets wrapped:';
$lang['settingsDateFormat'] = 'Format of date and time display:';
$lang['settingsPersistFontColor'] = 'Persist font color:';
$lang['settingsAudioVolume'] = 'Sound Volume:';
$lang['settingsSoundReceive'] = 'Sound for incoming messages:';
$lang['settingsSoundSend'] = 'Sound for outgoing messages:';
$lang['settingsSoundEnter'] = 'Sound for login and channel enter messages:';
$lang['settingsSoundLeave'] = 'Sound for logout and channel leave messages:';
$lang['settingsSoundChatBot'] = 'Sound for chatbot messages:';
$lang['settingsSoundError'] = 'Sound for error messages:';
$lang['settingsSoundPrivate'] = 'Sound for private messages:';
$lang['settingsBlink'] = 'Blink window title on new messages:';
$lang['settingsBlinkInterval'] = 'Blink interval in milliseconds:';
$lang['settingsBlinkIntervalNumber'] = 'Number of blink intervals:';
$lang['playSelectedSound'] = 'Play selected sound';
$lang['requiresJavaScript'] = 'JavaScript er krafist fyrir Þessi tala.';
$lang['errorInvalidUser'] = 'Ógilt notandanafn.';
$lang['errorUserInUse'] = 'Notandanafn þegar í notkun.';
$lang['errorBanned'] = 'Notandi eða IP er bannaður.';
$lang['errorMaxUsersLoggedIn'] = 'Herbergið er fullt.';
$lang['errorChatClosed'] = 'Herbergið er lokað.';
$lang['logsTitle'] = 'AJAX Chat - Logger';
$lang['logsDate'] = 'Dagsetning';
$lang['logsTime'] = 'Tími';
$lang['logsSearch'] = 'Leita';
$lang['logsPrivateChannels'] = 'Einkarásir';
$lang['logsPrivateMessages'] = 'Einkarásir';

is.js file :

Code: Select all

 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @author DagArneKirkerod
 * @copyright (c) Sebastian Tschan
 * @license Modified MIT License
 * @link

// Ajax Chat language Object:
var ajaxChatLang = {

	login: '%s Skráðu þig inn á spjallið.',
	logout: '%s Skráning út úr spjalli.',
	logoutTimeout: '%s Hafa verið skráðir út (Takmarka).',
	logoutIP: '%s hefur verið skráð út (Ógilt IP-vistfang).',
	logoutKicked: '%s hefur verið skráð út (Sparkað út).',
	channelEnter: '%s Farið inn í rásina.',
	channelLeave: '%s yfirgefa rásina.',
	privmsg: '(Hvíslarar)',
	privmsgto: '(Hvíslar að %s).',
	invite: '%s Bjóða þér að taka þátt %s.',
	inviteto: 'Boð þitt um %s að tengjast rásinni hefur %s verið sent.',
	uninvite: '%s Afturköllun boðs af rás %s.',
	uninviteto: 'Afturköllun boðsins á %s rásina hefur %s verið send.', 
	queryOpen: 'Einkarás opnuð fyrir %s.',
	queryClose: 'Einkarás til %s er lokuð.',
	ignoreAdded: 'Bætt %s við listann yfir hunsaða notendur.',
	ignoreRemoved: 'Fjarlægt %s af lista yfir hunsaða notendur.',
	ignoreList: 'Notendur hunsaðir:',
	ignoreListEmpty: 'Engir hunsaðir notendur á listanum.',
	who: 'Innskráðir notendur:',
	whoChannel: 'Tengdir notendur í rás %s:',
	whoEmpty: 'Engir innskráðir notendur á valda rás.',
	list: 'Tiltækar rásir:',
	bans: 'Sparkað út notendum:',
	bansEmpty: 'Engir reknir notendur á listanum.',
	unban: 'Notandi %s fjarlægður af lista yfir rekna notendur.',
	whois: 'Notandi %s - IP-tala:',
	whereis: 'User %s is in channel %s.',
	roll: '%s Hjól %s og kindur %s.',
	nick: '%s is now known as %s.',
	toggleUserMenu: 'Toggle user menu for %s',
	userMenuLogout: 'Logout',
	userMenuWho: 'List online users',
	userMenuList: 'List available channels',
	userMenuAction: 'Describe action',
	userMenuRoll: 'Roll dice',
	userMenuNick: 'Breyta notandanafni',
	userMenuEnterPrivateRoom: 'Sláðu inn sérherbergi',
	userMenuSendPrivateMessage: 'Senda einkaskilaboð',
	userMenuDescribe: 'Senda einkaaðgerð',
	userMenuOpenPrivateChannel: 'Opin einkarás',
	userMenuClosePrivateChannel: 'Loka einkarás',
	userMenuInvite: 'Invite',
	userMenuUninvite: 'Uninvite',
	userMenuIgnore: 'Ignore/Accept',
	userMenuIgnoreList: 'Listi yfir hunsaða notendur',
	userMenuWhereis: 'Skoða rás',
	userMenuKick: 'Kick/Ban',
	userMenuBans: 'Birta lista yfir útilokaða notendur',
	userMenuWhois: 'Birti IP',
	unbanUser: 'Afturkalla bann notanda %s',
	joinChannel: 'Tengjast rás %s',
	cite: '%s Sagði:',
	urlDialog: 'Sláðu inn veffang (URL) vefsíðunnar:',
	deleteMessage: 'Eyða þessu spjallskeyti',
	deleteMessageConfirm: 'Ertu viss um að þú viljir eyða völdu spjallbréfi?',
	errorCookiesRequired: 'Kökur eru nauðsynlegar á þessu spjalli.',
	errorUserNameNotFound: 'Villa: Notandi %s fannst ekki.',
	errorMissingText: 'Villa: Texta boða vantar.',
	errorMissingUserName: 'Villa: Vantar notandanafn.',
	errorInvalidUserName: 'Villa: Ógilt notandanafn.',
	errorUserNameInUse: 'Villa: Notandanafnið er þegar í notkun.',
	errorMissingChannelName: 'Villa: Heiti rásar vantar.',
	errorInvalidChannelName: 'Villa: Rangt heiti rásar: %s',
	errorPrivateMessageNotAllowed: 'Villa: Einkaskilaboð ekki leyfð.',
	errorInviteNotAllowed: 'Villa: Þú hefur ekki heimild til að bjóða einhverjum á þessa rás.',
	errorUninviteNotAllowed: 'Villa: hefur ekki leyfi til i til notenda essari rás.',
	errorNoOpenQuery: 'Villa: Engar einkarásir eru opnar.',
	errorKickNotAllowed: 'Rangt: Þú mátt ekki sparka út %s.',
	errorCommandNotAllowed: 'Villa: Skipun ekki leyfð: %s',
	errorUnknownCommand: 'Villa: Óþekkt skipun: %s',
	errorMaxMessageRate: 'Villa: Þú fórst yfir hámarksfjölda skilaboða á mínútu.',
	errorConnectionTimeout: 'Villa: Connection tími útrunninn. Reyndu aftur.',
	errorConnectionStatus: 'Villa: Staða tengingar: %s',
	errorSoundIO: 'Villa: Ekki tókst að lesa hljóðskrá (Flash IO Error).',
	errorSocketIO: 'Villa: Tenging við falsþjón mistókst (Flash IO Error).',
	errorSocketSecurity: 'Villa: Tenging við innstunguþjón mistókst (Flash Security Error).',
	errorDOMSyntax: 'Villa: Ógild DOM setningafræði (DOM ID: %s).'

the above : is.php and is.js files use no.php and no.js - as templates
following the example of words remaining in english.
Last edited by P_I on Sat Jul 29, 2023 2:23 pm, edited 1 time in total.
Reason: Changed to use code tags
Registered User
Posts: 333
Joined: Sat Mar 07, 2009 12:39 pm
Location: Central Hessen, close to the "heart of nature", Germany

Re: Creating/Adding languages to Standalone Ajax Chat

Post by wintstar »

I know it's late to reply, but it will be worth it for those who would like to use this chat.
There is an update for this chat. New:
  • php > 7.4
  • HTML5-Sound
  • Detailed description in English and German
Currently in use with version 8.3.2 and MariaDB 10.11.4. There are further plans, look on Github.
Integration into existing authentication systems are not support from me.

Chat Logs
Sound slect

Example phpBB 3.3.11 as integration
phpBB Chat
phpBB Shoutbox
You do not have the required permissions to view the files attached to this post.

Return to “[3.3.x] Translations”