Download the PHP package webflorist/privacy-policy-text without Composer
On this page you can find all versions of the php package webflorist/privacy-policy-text. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webflorist/privacy-policy-text
More information about webflorist/privacy-policy-text
Files in webflorist/privacy-policy-text
Package privacy-policy-text
Short Description Open source texts for a privacy policy in german and english. Available as php or json.
License MIT
Homepage https://github.com/webflorist/privacy-policy-text#readme
Informations about the package privacy-policy-text
Privacy Policy Texts in German and English
This package includes open source texts for a GDPR conform privacy policy of a website. They come in php and json files to be used by common translation frameworks.
Table Of Contents
- Demo
- Features
- Ecosystem
- Installation
- Usage
- In Javascript
- Interpolations
- Markdown Functionality
- Disclaimer
- License
Demo
An demo application with the texts included in this package is avaliable at:
https://privacy-policy-vue-demo.netlify.app/
This demo uses the package webflorist/privacy-policy-vue
.
Features
-
Languages
Currently the package includes texts in german and english language. -
Singular/Plural
The files are provided both from singular and plural viewpoints.
(e.g.My website...
vsOur website...
) -
Formats
Currently the package includes files inphp
as well asjson
format. -
Included Texts
- A general intro text
- Listing of GDPR rights
- Text to introduce data controller
- General data security text (SSL, etc.)
- Cookies information
- Information on data processing of third party data processors:
- Webhosting
- Web analytics
- Interactive maps
- Sending of emails (e.g. contact forms)
- Disclaimer regarding outgoing links
Ecosystem
This package is mainly meant as a backend package for other implementations, which use it to provide a privacy policy component to a certain framework.
The following companion packages are currently available: | Package | Framework |
---|---|---|
webflorist/privacy-policy-vue | Vue | |
webflorist/privacy-policy-laravel | Laravel |
Installation
Using composer:
Using npm:
Using yarn:
Usage
In Javascript
The ESM module exports the following stuff:
-
Objects structured as
{ de: Object, en: Object}
including the translation strings with the corresponding interpolation format: -
An object with information about various processors (see
processors.json
): - A helper function to render the markdown functionality in the language strings:
Check out the Vue component of webflorist/privacy-policy-vue for an example implementation.
Here is and example using a singular viewpoint and a translation library with curly-wrap interpolations:
Interpolations
(Replacing Parameters In Translation Strings)
Any dynamic parts of the language files can be interpolated by the translation-library of your choice. The following formats are supported (each with corresponding json and php files):
- with colon prefix (
:key
)
(e.g. used by Laravel) - wrapped with curly braces (
{key}
)
(e.g. used by Vue I18n) - wrapped with double curly braces (
{{key}}
)
(e.g. used by i18next)
The following interpolations are present in the language files:
Markdown Functionality
The language files include some markdown functionality:
**Bold Elements**
- and
[Links to](#anchors)
The package includes a renderText(text)
function to render these markdowns. The package exports this function. So usage would be as follows:
In Javascript:
Disclaimer
The included text should be suitable for a GDPR-compliant website.
I however do not take any responsibility whatsowever for that.
License
This package is open-sourced software licensed under the MIT license.