Fix compatibility with wxWidgets 3.0.x
- Use CanonicalName when GetCanonicalWithRegion() isn't available
This commit is contained in:
parent
1b07e81936
commit
b21e65fc5f
|
@ -19,12 +19,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <font/fontconfig.h>
|
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <trace_helpers.h>
|
#include <trace_helpers.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
|
#include <font/fontconfig.h>
|
||||||
|
|
||||||
using namespace fontconfig;
|
using namespace fontconfig;
|
||||||
|
|
||||||
|
|
|
@ -783,7 +783,11 @@ wxString PGM_BASE::GetLanguageTag()
|
||||||
return "";
|
return "";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if wxCHECK_VERSION( 3, 1, 6 )
|
||||||
wxString str = langInfo->GetCanonicalWithRegion();
|
wxString str = langInfo->GetCanonicalWithRegion();
|
||||||
|
#else
|
||||||
|
wxString str = langInfo->CanonicalName;
|
||||||
|
#endif
|
||||||
str.Replace( "_", "-" );
|
str.Replace( "_", "-" );
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
|
Loading…
Reference in New Issue