diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php
index 3ed3a92cb50..a936d0fc857 100644
--- a/htdocs/core/website.inc.php
+++ b/htdocs/core/website.inc.php
@@ -18,7 +18,7 @@
/**
* \file htdocs/core/website.inc.php
- * \brief Common file loaded used by all website pages (after master.inc.php)
+ * \brief Common file loaded by all website pages (after master.inc.php). It set the new object $weblangs, using parameter 'l'.
* The global variable $websitekey must be defined.
*/
@@ -26,4 +26,7 @@ include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
$website=new Website($db);
$website->fetch(0,$websitekey);
+$weblangs = dol_clone($langs);
+if (GETPOST('l','aZ09')) $weblangs->setDefaultLang(GETPOST('l','aZ09'));
+
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index ec4c256ac23..9ed064b5d1e 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -51,7 +51,7 @@ NoPageYet=No pages yet
YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template
SyntaxHelp=Help on specific syntax tips
YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor.
-YouCanEditHtmlSource=
You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $langs, $db, $mysoc, $user, $website.
You can also include content of another Page/Container with the following syntax:
<?php includeContainer('alias_of_container_to_include'); ?>
You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
<?php redirectToContainer('alias_of_container_to_redirect_to'); ?>
To add a link to another page, use the syntax:
<a href="alias_of_page_to_link_to.php">mylink<a>
To include a link to download a file stored into the documents directory, use the document.php wrapper:
Example, for a file into documents/ecm (need to be logged), syntax is:
<a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
For a file into documents/medias (open directory for public access), syntax is:
<a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
For a file shared with a share link (open access using the sharing hash key of file), syntax is:
<a href="/document.php?hashp=publicsharekeyoffile">
To include an image stored into the documents directory, use the viewimage.php wrapper:
Example, for an image into documents/medias (open directory for public access), syntax is:
<img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
+YouCanEditHtmlSource=
You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $weblangs.
You can also include content of another Page/Container with the following syntax:
<?php includeContainer('alias_of_container_to_include'); ?>
You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
<?php redirectToContainer('alias_of_container_to_redirect_to'); ?>
To add a link to another page, use the syntax:
<a href="alias_of_page_to_link_to.php">mylink<a>
To include a link to download a file stored into the documents directory, use the document.php wrapper:
Example, for a file into documents/ecm (need to be logged), syntax is:
<a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
For a file into documents/medias (open directory for public access), syntax is:
<a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
For a file shared with a share link (open access using the sharing hash key of file), syntax is:
<a href="/document.php?hashp=publicsharekeyoffile">
To include an image stored into the documents directory, use the viewimage.php wrapper:
Example, for an image into documents/medias (open directory for public access), syntax is:
<img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
ClonePage=Clone page/container
CloneSite=Clone site
SiteAdded=Web site added