$63 GRAYBYTE WORDPRESS FILE MANAGER $14

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic/

HOME
Current File : /opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic//translate.py
from jinja2 import Environment

env = Environment(extensions=["jinja2.ext.i18n"])
env.globals["gettext"] = {"Hello %(user)s!": "Hallo %(user)s!"}.__getitem__
env.globals["ngettext"] = lambda s, p, n: {
    "%(count)s user": "%(count)d Benutzer",
    "%(count)s users": "%(count)d Benutzer",
}[s if n == 1 else p]
print(
    env.from_string(
        """\
{% trans %}Hello {{ user }}!{% endtrans %}
{% trans count=users|count -%}
{{ count }} user{% pluralize %}{{ count }} users
{% endtrans %}
"""
    ).render(user="someone", users=[1, 2, 3])
)


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
9 Nov 2021 8.26 PM
root / linksafe
0755
templates
--
3 Mar 2024 11.11 PM
root / linksafe
0755
cycle.py
0.294 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
debugger.py
0.218 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
inheritance.py
0.383 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
test.py
0.659 KB
11 May 2021 11.25 PM
root / linksafe
0644
test_filter_and_linestatements.py
0.445 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
test_loop_filter.py
0.294 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
translate.py
0.531 KB
5 Apr 2021 5.47 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF