Skip to content

Commit

Permalink
Add language in custom property in Plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Apr 29, 2024
1 parent e9dd7b1 commit f4dd729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions source/_template/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
{%- endif %}
{% if plausible_url and plausible_domain %}
<script defer data-domain="{{ plausible_domain }}" src="{{ plausible_url }}"></script>
<script>
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) };
plausible('language',{props:{language:navigator.language.toString().substr(0,2).toLowerCase()}});
</script>
{% endif %}
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion source/publish/layer_properties/attributes_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Lizmap can reproduce several behavior configured in QGIS :
* :guilabel:`Expression` with ``"has_photo" = true OR "has_photo" = 't'``

* **Constraints defined by expression**.
For example, you want to simply assert users correctly type a website URL beginning by `http` (of course, a
For example, you want to simply assert users correctly type a website URL beginning by ``http`` (of course, a
`regular expression <https://regexr.com/>`_ would be better but we keep it simple).

#. Create a field named ``website`` defined as a :guilabel:`Text Edit` widget
Expand Down

0 comments on commit f4dd729

Please sign in to comment.