Page MenuHomePhorge

D26054.1749265426.diff
No OneTemporary

D26054.1749265426.diff

diff --git a/src/view/page/AphrontPageView.php b/src/view/page/AphrontPageView.php
--- a/src/view/page/AphrontPageView.php
+++ b/src/view/page/AphrontPageView.php
@@ -65,9 +65,16 @@
$data_fragment = null;
}
+ if ($this->hasViewer() && $this->getViewer()->isLoggedIn()) {
+ $html_lang = phutil_safe_html(' lang="'.
+ str_replace('_', '-', $this->getViewer()->getTranslation().'"'));
+ } else {
+ $html_lang = phutil_safe_html(' lang="en"');
+ }
+
$response = hsprintf(
'<!DOCTYPE html>'.
- '<html%s>'.
+ '<html%s%s>'.
'<head>'.
'<meta charset="UTF-8" />'.
'<title>%s</title>'.
@@ -76,6 +83,7 @@
'%s'.
'</html>',
$data_fragment,
+ $html_lang,
$title,
$head,
$body);

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 7, 03:03 (6 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1753247
Default Alt Text
D26054.1749265426.diff (807 B)

Event Timeline