summaryrefslogtreecommitdiff
path: root/src/mailman/languages/language.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-02-12 20:36:21 -0500
committerBarry Warsaw2009-02-12 20:36:21 -0500
commit62f4c909f90535986614a411db982bdcccaec3a1 (patch)
tree2fe5dd3316cea73f63cb34230d848758050eade3 /src/mailman/languages/language.py
parent2b28803e7165e91d812cd9e9e3804a6d9bdce8a1 (diff)
downloadmailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.gz
mailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.zst
mailman-62f4c909f90535986614a411db982bdcccaec3a1.zip
Diffstat (limited to 'src/mailman/languages/language.py')
-rw-r--r--src/mailman/languages/language.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/mailman/languages/language.py b/src/mailman/languages/language.py
new file mode 100644
index 000000000..f5e83c255
--- /dev/null
+++ b/src/mailman/languages/language.py
@@ -0,0 +1,47 @@
+# Copyright (C) 2009 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
+
+"""The representation of a language."""
+
+
+from __future__ import absolute_import, unicode_literals
+
+__metaclass__ = type
+__all__ = [
+ 'Language',
+ ]
+
+
+from zope.interface import implements
+from mailman.interfaces.languages import ILanguage
+
+
+
+class Language:
+ """The representation of a language."""
+
+ implements(ILanguage)
+
+ def __init__(self, code, charset, description):
+ self.code = code
+ self.charset = charset
+ self.description = description
+
+ def __str__(self):
+ return '<Language [{0.code}] {0.description}>'.format(self)
+
+ __repr__ = __str__