mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-18 21:09:42 -05:00
feat: translations support
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block headtitle %}About - {{PORTAL_NAME}}{% endblock headtitle %}
|
||||
|
||||
{% block headermeta %}
|
||||
|
||||
{% load custom_filters %}
|
||||
<meta property="og:title" content="About - {{PORTAL_NAME}}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="">
|
||||
@@ -38,10 +39,13 @@
|
||||
{% endblock headermeta %}
|
||||
|
||||
{% block innercontent %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
<div class="custom-page-wrapper">
|
||||
<h2>About</h2>
|
||||
<h2>{{ "About" | custom_translate:LANGUAGE_CODE}}</h2>
|
||||
<hr/>
|
||||
|
||||
<p><a href="https://mediacms.io">MediaCMS</a> is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media.</p>
|
||||
|
||||
<p><a href="https://mediacms.io">MediaCMS</a> {{ "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media" | custom_translate:LANGUAGE_CODE}}.</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
68
templates/cms/set_language.html
Normal file
68
templates/cms/set_language.html
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load custom_filters %}
|
||||
|
||||
{% block headtitle %}About - {{PORTAL_NAME}}{% endblock headtitle %}
|
||||
|
||||
{% block headermeta %}
|
||||
|
||||
<meta property="og:title" content="About - {{PORTAL_NAME}}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [{
|
||||
"@type": "ListItem",
|
||||
"position": 1,
|
||||
"name": "{{PORTAL_NAME}}",
|
||||
"item": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{FRONTEND_HOST}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": 2,
|
||||
"name": "About",
|
||||
"item": {
|
||||
"@type": "AboutPage",
|
||||
"@id": "{{FRONTEND_HOST}}/about"
|
||||
}
|
||||
}]
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock headermeta %}
|
||||
|
||||
{% block innercontent %}
|
||||
<div class="custom-page-wrapper">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
<h1>{{"Change Language"| custom_translate:LANGUAGE_CODE}}</h1>
|
||||
<hr/>
|
||||
<h2>{{"Select"| custom_translate:LANGUAGE_CODE}}</h2>
|
||||
|
||||
<p>
|
||||
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
|
||||
<input name="next" type="hidden" value="/">
|
||||
<select name="language">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
{% get_language_info_list for LANGUAGES as languages %}
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
|
||||
{{ language.name_local }} ({{ language.code }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="submit" value={{"Go"| custom_translate:LANGUAGE_CODE}}>
|
||||
</form>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user