Giter VIP home page Giter VIP logo

Comments (7)

ZenLiuCN avatar ZenLiuCN commented on June 27, 2024 1

问题找到,在初始化的时候需要设置accept_language_list;
代码修改位置:
DCefB.Core.App:1118 添加一行
settings.accept_language_list := TCef3Helper.CefString(AcceptLanguageList);
DCefB.Core.DcefBroswer:1270添加一行
Settings.accept_language_list := TCef3Helper.CefString(FChromiumOptions.AcceptLanguageList);
测试成功
我用的是预先配置的方法
DcefBApp.CefAcceptLanguageList := 'zh-CN';

from dcefbrowser.

himStone avatar himStone commented on June 27, 2024

这个问题的确存在 一直没能找到解决办法

from dcefbrowser.

ZenLiuCN avatar ZenLiuCN commented on June 27, 2024

DCEF3里面却是没有问题..有点诡异

from dcefbrowser.

ZenLiuCN avatar ZenLiuCN commented on June 27, 2024

@bccsafe

from dcefbrowser.

himStone avatar himStone commented on June 27, 2024

非常感谢 @ZenLiuCN

本地语言设置方法:

DcefBApp.CefAcceptLanguageList := 'zh-CN';

doOnBeforeResourceLoad 事件还是有问题,这个issue就暂时不关了

from dcefbrowser.

lieliefeng avatar lieliefeng commented on June 27, 2024

constructor TCefRequestHandlerOwn.create;
begin
inherited CreateData(SizeOf(TCefRequestHandler));
with PCefRequestHandler(FData)^ do
begin
on_before_browse := cef_request_handler_on_before_browse;
on_open_urlfrom_tab := cef_request_handler_on_open_urlfrom_tab;
//on_before_resource_load := cef_request_handler_on_before_resource_load;
//上面的注释导致OnBeforeResourceLoad 不触发,但是取消掉注释不能加载页面

from dcefbrowser.

lieliefeng avatar lieliefeng commented on June 27, 2024

问题找到了,on_open_urlfrom_tab , cef_request_handler_on_open_urlfrom_tab 定义的函数返回类型修改为integer 就可以了

from dcefbrowser.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.