summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 2d28090c7..06cf706ea 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1844,4 +1844,20 @@ function rcmail_folder_classname($folder_id)
}
+/**
+ * Try to localize the given IMAP folder name.
+ * UTF-7 decode it in case no localized text was found
+ *
+ * @param string Folder name
+ * @return string Localized folder name in UTF-8 encoding
+ */
+function rcmail_localize_foldername($name)
+{
+ if ($folder_class = rcmail_folder_classname($name))
+ return rcube_label($folder_class);
+ else
+ return rcube_charset_convert($name, 'UTF-7');
+}
+
+
?>