首页 > cef > CEF-设置语言首选项Accept-Language
2017十一月6

CEF-设置语言首选项Accept-Language

针对www.facebook.com等多语言网页

使用属性CefSettings.accept_language_list全局设置

使用属性CefBrowserSettings.accept_language_list取代

或使用以下取代

CefRequestHandler::ReturnValue DUINativeWeb::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,CefRefPtr<CefFrame> frame,CefRefPtr<CefRequest> request,CefRefPtr<CefRequestCallback> callback)
{
	if (request)
	{
		if (g_pDMWebApp && g_pDMWebApp->m_SwitchMap.end()!=g_pDMWebApp->m_SwitchMap.find(L"lang"))
		{
			CefRequest::HeaderMap headerMap;
			request->GetHeaderMap(headerMap);
			headerMap.insert(std::pair<CefString, CefString>(L"Accept-Language",SAFE_STR(g_pDMWebApp->m_SwitchMap[L"lang"].c_str())));
			request->SetHeaderMap(headerMap);
		}

文章作者:hgy413
本文地址:http://hgy413.com/4497.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

12 Responses to “CEF-设置语言首选项Accept-Language”

  1. #1 minecraft 回复 | 引用 Post:2018-10-06 07:38

    Hi there, everything is going nicely here and ofcourse every one is sharing
    data, that’s actually excellent, keep up writing.

  2. #2 minecraft 回复 | 引用 Post:2018-10-07 01:45

    Hello there, I do think your web site might be having browser compatibility issues.
    When I look at your website in Safari, it looks fine however when opening in IE,
    it has some overlapping issues. I merely wanted to
    give you a quick heads up! Aside from that, wonderful website!

  3. #3 minecraft 回复 | 引用 Post:2018-10-07 16:18

    I couldn’t resist commenting. Very well written!

  4. Hi there! Would you mind if I share your blog with my zynga group?
    There’s a lot of people that I think would really enjoy your
    content. Please let me know. Many thanks

  5. Heya i’m for the primary time here. I found this board and I in finding It really helpful &
    it helped me out a lot. I’m hoping to provide something back and aid others like you
    aided me.

  6. #6 quest bars cheap 回复 | 引用 Post:2018-11-03 15:29

    I love reading an article that will make people think. Also, many
    thanks for allowing me to comment!

  7. #7 Sling TV 回复 | 引用 Post:2018-11-10 01:55

    Paragraph writing is also a excitement, if you know then you can write otherwise it is complicated to write.

  8. I think the admin of this web site is genuinely working hard in favor of his site,
    since here every information is quality based information.

  9. I have read some good stuff here. Certainly price bookmarking for revisiting.
    I surprise how much effort you set to create the sort of wonderful informative site.

  10. #10 Sling TV 回复 | 引用 Post:2018-11-14 03:47

    Hi there to all, since I am genuinely keen of reading
    this webpage’s post to be updated daily. It includes fastidious material.

  11. #11 Sling TV 回复 | 引用 Post:2018-11-15 07:37

    This design is spectacular! You obviously know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Wonderful job. I really loved what you had to say,
    and more than that, how you presented it. Too cool!

  12. I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored material stylish.
    nonetheless, you command get got an edginess over that you wish be delivering the following.
    unwell unquestionably come further formerly again as exactly the
    same nearly very often inside case you shield this hike.

发表评论