You can configure the Captive Portal to show the Network Login pages in different languages. After you set the language selection list, users can choose the language they prefer to log in with from a list at the bottom of the page.
To configure a language for Captive Portal you must:
The supported language file contains entries for languages that you can see in the list on the Captive Portal page.
By default, English is the only language entry in the list. It has a corresponding language file. For each new language, you must create an entry in the supported languages file and create a new language file.
To create a new language, add an entry to the supported languages file:
/opt/CPNacPortal/phpincs/conf/L10N/supportedLanguages.php
$arLanguages
array, create a new locale entry with the syntax: "xx_XX" => "XName"
. For example: "de_DE" => "German".
To disable a language:
Comment out the line of the specific language or delete the line.
To create new language files, use the English language file (portal_en_US.php
) as a template and refer to it for the source language. The file contains the message strings. It is not necessary to translate all strings, but you must include all strings in the new language file.
When you translate a string, make sure that the string's length is almost the same in size as the initial English string. This is important to prevent breaks in the page layout. If this is not possible, consult with technical support.
You cannot use HTML special character sequences such as / < / >
in the translated strings.
To create a new language file:
/opt/CPNacPortal/phpincs/conf/L10N/portal_en_US.php
portal_xx_XX.php.
For example, portal_de_DE.php
chmod 666 <file name>
.You must save the language file with UTF-8 encoding.
To save a file with UTF-8 encoding:
portal_xx_XX.php
. For example: portal_de_DE.php
./opt/CPNacPortal/phpincs/conf/L10N
if it is not already there.When you only use the English language, the language selection list does not show at the bottom of the Captive Portal Network Login page. When you configure additional languages, you must show the language selection list on the Network Login page. Captive Portal users can then select the language, with which to log in.
To see the language list on the Network Login page:
/opt/CPNacPortal/phpincs/view/html/Authentication.php
<label for="language_selection">
, remove the lines that start with <?PHP /*
and end with */ ?>
The lines to remove are in the square:
The language selection list will show on the Network Login page.
To revert to not showing the language selection list, replace the current file with the backup of the original file.
To make sure the strings show correctly: