aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index beda581a..19045798 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -788,6 +788,19 @@ class Entry
788 } 788 }
789 789
790 /** 790 /**
791 * Format the entry language to a valid html lang attribute.
792 */
793 public function getHTMLLanguage()
794 {
795 $parsedLocale = \Locale::parseLocale($this->getLanguage());
796 $lang = '';
797 $lang .= $parsedLocale['language'] ?? '';
798 $lang .= isset($parsedLocale['region']) ? '-' . $parsedLocale['region'] : '';
799
800 return $lang;
801 }
802
803 /**
791 * @return string|null 804 * @return string|null
792 */ 805 */
793 public function getUid() 806 public function getUid()