Skip to content
Snippets Groups Projects
Commit a3edbc67 authored by Ketil Albertsen's avatar Ketil Albertsen
Browse files

Language check and correction of a number of errors.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@457 44740490-163a-0410-bde0-09ae8108e29a
parent 02e0c284
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</articleinfo> </articleinfo>
<warning> <warning>
<para>This document is in progress of beeing written.</para> <para>This document still in the writing stage.</para>
</warning> </warning>
<section> <section>
...@@ -49,20 +49,21 @@ ...@@ -49,20 +49,21 @@
<para>The <literal>session.handler</literal> configuration option in <para>The <literal>session.handler</literal> configuration option in
<filename>config.php</filename> allows you to select which session handler <filename>config.php</filename> allows you to select which session handler
SimpleSAMLPHP should use to store the session information. Currently we SimpleSAMLphp should use to store the session information. Currently,
have two session handlers:</para> two session handlers are included in the distribution:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>PHPSESSION is using the built in session management in PHP. This <para><literal>phpsession</literal> uses the built in session
is the default, and is simplest to use. But it will not work in a management in PHP. This is the default, and is simplest to use. It
load-balanced environement.</para> will not work in a load-balanced environement.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>memcache is using the memcache software to cache sessions in <para><literal>memcache</literal> uses the memcache software to cache
memory. Sessions can be distributed and replicated among several sessions in memory. Sessions can be distributed and replicated among
memcache servers, enabling both load-balancing and fail-over.</para> several memcache servers, enabling both load-balancing and
fail-over.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -71,12 +72,13 @@ ...@@ -71,12 +72,13 @@
<section> <section>
<title>Configuring memcache</title> <title>Configuring memcache</title>
<para>To use the memcache session handler, set the session.handler <para>To use the memcache session handler, set the
parameter in <literal>config.php</literal>:</para> <literal>session.handler</literal> parameter in
<literal>config.php</literal>:</para>
<programlisting>'session.handler' =&gt; 'memcache',</programlisting> <programlisting>'session.handler' =&gt; 'memcache',</programlisting>
<para>Memcache allows you to store multiple redudant copies of sessions <para>memcache allows you to store multiple redudant copies of sessions
on different memcache servers.</para> on different memcache servers.</para>
<para>The configuration parameter <para>The configuration parameter
...@@ -94,8 +96,8 @@ ...@@ -94,8 +96,8 @@
<glossterm><literal>hostname</literal></glossterm> <glossterm><literal>hostname</literal></glossterm>
<glossdef> <glossdef>
<para>This is the hostname or ip address where the memcache server <para>Host name or ip address of a memcache server runs. This is
runs. This is the only required option.</para> the only required option.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
...@@ -103,10 +105,9 @@ ...@@ -103,10 +105,9 @@
<glossterm><literal>port</literal></glossterm> <glossterm><literal>port</literal></glossterm>
<glossdef> <glossdef>
<para>This is the port number of the memcache server. If this <para>Port number of the memcache server. If not set, the
option isn't set, then we will use the <literal>memcache.default_port</literal> ini setting is used. This
<literal>memcache.default_port</literal> ini setting. This is is 11211 by default.</para>
11211 by default.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
...@@ -114,10 +115,9 @@ ...@@ -114,10 +115,9 @@
<glossterm><literal>weight</literal></glossterm> <glossterm><literal>weight</literal></glossterm>
<glossdef> <glossdef>
<para>This sets the weight of this server in this server group. <para>Weight of this server in this server group. <ulink
<ulink
url="http://php.net/manual/en/function.Memcache-addServer.php">http://php.net/manual/en/function.Memcache-addServer.php</ulink> url="http://php.net/manual/en/function.Memcache-addServer.php">http://php.net/manual/en/function.Memcache-addServer.php</ulink>
contains more information about the weight option.</para> has more information about the weight option.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<glossterm><literal>timeout</literal></glossterm> <glossterm><literal>timeout</literal></glossterm>
<glossdef> <glossdef>
<para>The timeout for this server. By default, the timeout is 3 <para>Timeout for this server. By default, the timeout is 3
seconds.</para> seconds.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
...@@ -144,14 +144,14 @@ ...@@ -144,14 +144,14 @@
the b-group.</para> the b-group.</para>
<programlisting>'memcache_store.servers' =&gt; array( <programlisting>'memcache_store.servers' =&gt; array(
array( array(
array('hostname' =&gt; 'mc_a1'), array('hostname' =&gt; 'mc_a1'),
array('hostname' =&gt; 'mc_a2'), array('hostname' =&gt; 'mc_a2'),
), ),
array( array(
array('hostname' =&gt; 'mc_b1'), array('hostname' =&gt; 'mc_b1'),
array('hostname' =&gt; 'mc_b2'), array('hostname' =&gt; 'mc_b2'),
), ),
),</programlisting> ),</programlisting>
</example> </example>
...@@ -164,16 +164,16 @@ ...@@ -164,16 +164,16 @@
will be lost if the memcache server crashes.</para> will be lost if the memcache server crashes.</para>
<programlisting>'memcache_store.servers' =&gt; array( <programlisting>'memcache_store.servers' =&gt; array(
array( array(
array('hostname' =&gt; 'localhost'), array('hostname' =&gt; 'localhost'),
), ),
),</programlisting> ),</programlisting>
</example> </example>
<para>The expiration value (<literal>memcache_store.expires</literal>) <para>The expiration value (<literal>memcache_store.expires</literal>)
is the duration data should be stored in memcache. Datawill be dropped is the duration for which data should be retained in memcache. Data are
from the memcache servers when this time expires. The time will be reset dropped from the memcache servers when this time expires. The time will
every time the data is written to the memcache servers.</para> be reset every time the data is written to the memcache servers.</para>
<para>This value should always be larger than the <para>This value should always be larger than the
<literal>session.duration</literal> option. Not doing this may result in <literal>session.duration</literal> option. Not doing this may result in
...@@ -227,8 +227,8 @@ ...@@ -227,8 +227,8 @@
<section> <section>
<title>Logging and statistics</title> <title>Logging and statistics</title>
<para>Supports standard syslog logging. Also possible to configure <para>simpleSAMLphp supports standard <literal>syslog</literal> logging.
flatfile logging.</para> As an alternative, you may log to flat files.</para>
</section> </section>
<section> <section>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
<section> <section>
<title>Getting ready for production</title> <title>Getting ready for production</title>
<para>Here are some steps that should be checked</para> <para>Here are some checkpoints</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -258,23 +258,24 @@ ...@@ -258,23 +258,24 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Switch signing certificate if you have used one for test phase <para>If you during testing have been using a certificate that has
that have been exposed.</para> been exposed (notably: the one found in the simpleSAMLphp distribution):
Obtain and install a new one.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Make sure you have the latest security upgrades on your OS, <para>Make sure you have installed the latest security upgrades for
and</para> your OS.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Make sure you run on HTTPS and not HTTP.</para> <para>Make sure to use HTTPS rather than HTTP.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Block access to your servers anything except port 443. <para>Block access to your servers on anything except port 443.
simpleSAMLphp does not do anything but plan HTTP(s), so no need to simpleSAMLphp only uses plain HTTP(S), so there is no need to open
open ports for SOAP or other communication.</para> ports for SOAP or other communication.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
...@@ -290,89 +291,94 @@ ...@@ -290,89 +291,94 @@
<section> <section>
<title>Multi-language support</title> <title>Multi-language support</title>
<para>Localization files in <filename>dictionaries/</filename>.</para> <para>To add support for a new language, add your new language to the
<literal>language.available</literal> configuration parameter in
<para>To add support for a new language add your new language to the <filename>config.php</filename>:</para>
language.available configuration parameter in
<filename>config.php</filename>:</para> <programlisting> /*
* Languages available and which language is default
<programlisting> /* */
* Languages available and what language is default 'language.available' =&gt; array('en', 'no', 'dk', 'es', 'xx'),
*/ 'language.default' =&gt; 'en',</programlisting>
'language.available' =&gt; array('en', 'no', 'dk', 'es', 'xx'),
'language.default' =&gt; 'en',</programlisting> <para>Please use the standarized two-character <ulink
url="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">language codes
<para>Please use the standarized <ulink as specified in ISO-639-1</ulink>.</para>
url="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">language codes
as specified in ISO-639-1</ulink>.</para> <para>You also can set the default language. You should ensure
that the default language is complete, as it is used as a fallback when
<para>You also can set the default language. What is really important is a text is not available in the language selected by the user.</para>
that the default language is complete! The default language is also the
fallback, so that when a user selects a language that in example has not <tip>
translated all the error messages, then strings from the default languae <para>This may change in the future. We may distinguish between the
is used instead.</para> fallback-lanauge (which is usually English) and the default language.</para>
</tip>
<tip>
<para>This may change in the future. We may distinguish between the <para>All strings that can
fallback-lanauge (which usually are english) and the default be localized are found in the files <filename>dictionaries/</filename>.
language.</para> Add a new entry for each string, with your language code, like
</tip> this:</para>
<para>Next, the translation it self needs to be done. All the strings can <programlisting>'user_pass_header' =&gt; array(
be localized by editing the files in <filename>dictionaries/</filename>. 'en' =&gt; 'Enter your username and password',
Add a new entry for each string, with your language code, like 'no' =&gt; 'Skriv inn brukernavn og passord',
this:</para> 'xx' =&gt; 'Pooa jujjique jamba',
),</programlisting>
<programlisting>'user_pass_header' =&gt; array(
'en' =&gt; 'Enter your username and password', <para>You can translate as many of the texts as you would like; a full translation is
'no' =&gt; 'Skriv inn brukernavn og passord', not required unless you want to make this the default language. From the end users
'xx' =&gt; 'Pooa jujjique jamba', point of view, it looks best if all text fragments used in a given screen or form
),</programlisting> is in one single language.
</para>
<para>Note that themes used for customization of the web frontend (see below)
also may contain language specific texts which you would like to include in your
translation. Language independent themes may be created by putting all theme
texts in a file in the <filename>dictionaries</filename> directory.
</para>
<para>You can translate as much as you would like, a full translation is
not required. Though, it looks abit stupid with half of the text in
english, and only half of the text localized.</para>
</section> </section>
<section> <section>
<title>Customizing the web frontend with themes</title> <title>Customizing the web frontend with themes</title>
<para>All XHTML templates are stored in the <para>All XHTML templates are stored in the
<filename>templates/</filename> directory. In this directory there is one <filename>templates/</filename> directory, one
directory for each theme. The default theme is named subdirectory for each theme. The default theme is named
<literal>default</literal>. An example theme is provided named <literal>default</literal>. An sample theme is provided, named
<literal>feidernd</literal>.</para> <literal>feidernd</literal>.</para>
<para>It is possible to define a new theme, where only some of the pages <para>It is possible to define a new theme, where only some of the pages
is customized, for the rest of the pages, the default theme can be used. are customized. For the rest of the pages, the default theme is used.
The feidernd theme is a good example of this, here only the login page is The <literal>feidernd</literal> theme is a good example of this:
customized.</para> Only the login page is customized.</para>
<para>In <filename>config.php</filename> you specify which theme that you <para>In <filename>config.php</filename> you specify the theme to use,
would like to use, as well as a theme base. The theme base is the fallback as well as a theme base. The theme base is the fallback
theme that should be used when the selected theme does not include the theme that should be used when the selected theme does not include the
specific template needed to render a page. Here is an example of a specific template needed to render a page. Here is an example of a
configuration:</para> configuration:</para>
<programlisting> /* <programlisting> /*
* Which theme directory should be used? The base is fallback (leave it to default). * Which theme directory should be used? The base is fallback (leave it to default).
*/ */
'theme.use' =&gt; 'feidernd', 'theme.use' =&gt; 'feidernd',
'theme.base' =&gt; 'default',</programlisting> 'theme.base' =&gt; 'default',</programlisting>
<important> <important>
<para>The feidernd theme is based on the wordpress login form style. <para>The feidernd theme is based on the wordpress login form style.
Feel free to use this as a base for making your own login form. But Feel free to use this as a base for making your own login form. However:
please do not use the feidernd theme as it is, because it contains the Please do not use the feidernd theme unmodified - it contains the
Feide logo, which off course should not be used outside Feide.</para> Feide logo, which of course should be used to identify Feide services,
not services provided by your institution.</para>
</important> </important>
</section> </section>
<section> <section>
<title>Support</title> <title>Support</title>
<para>If you have problems to get this work, or want to discuss <para>If you need help to make this work, or want to discuss
simpleSAMLphp with other users of the software you are lucky! Around simpleSAMLphp with other users of the software you are fortunate: Around
simpleSAMLphp there is a great Open source community, and you are welcome simpleSAMLphp there is a great Open source community, and you are welcome
to join! Both for asking question, answer other questions, request to join! Both for asking question, answer other questions, request
improvements or contribute with code or plugins of your own.</para> improvements or contribute with code or plugins of your own.</para>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment