Opened 9 years ago
Last modified 5 years ago
#30049 reopened defect (bug)
wp_load_translations_early does not without WPLANG defined
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
In the Hungarian WP 4.0 the maintenance text appears in english.
Attachments (1)
Change History (15)
#2
@
9 years ago
And installed with the English package but then choosing Hungarian during install, rather than using the Hungarian package.
This ticket was mentioned in Slack in #polyglots by ocean90. View the logs.
9 years ago
#7
follow-up:
↓ 9
@
9 years ago
I may have found the solution, see:
https://wordpress.org/support/topic/translation-of-the-maintenance-mode?replies=19
You need to make sure $wp_local_package = 'YOUR LOCAL'; is defined at the end of wp-includes/version.php
The error may come from an upgrade, I had the same issue, and I could fix it this way.
This ticket was mentioned in Slack in #core-i18n by ocean90. View the logs.
8 years ago
#9
in reply to:
↑ 7
;
follow-up:
↓ 10
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Replying to temuag:
You need to make sure $wp_local_package = 'YOUR LOCAL'; is defined at the end of wp-includes/version.php
This global variable is defined when you download a localized package from a local site like hu.wordpress.org.
Sadly, there is nothing we can do. We can't access the locale option because wp_maintenance()
is loaded before a database connection can be initialized. wp_load_translations_early()
is also used for database errors so we can't access the database here too.
Closing as a wontfix, but feel free to reopen if you have a patch ready.
#10
in reply to:
↑ 9
@
7 years ago
Replying to ocean90:
Sadly, there is nothing we can do.
Maybe $_SERVER['HTTP_ACCEPT_LANGUAGE']
could be an alternative source for setting the locale.
#12
@
6 years ago
- Milestone set to Awaiting Review
- Resolution wontfix deleted
- Status changed from closed to reopened
Reopening to look into comment:10.
#13
@
5 years ago
Attached a simple HTTP_ACCEPT_LANGUAGE-based locale detection.
Regular expression based on a locale list from here https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes#3191729
This is in no way a substitute for the deprecated WPLANG
constant. We need to find a way to set the language for those notices without using WPLANG
now.
This is once WordPress is installed, yes?