【问题标题】:Magento 2 Translations in Minicart and Checkout in production modeMinicart 中的 Magento 2 翻译和生产模式下的 Checkout
【发布时间】:2017-10-03 23:26:58
【问题描述】:

我们在生产模式下遇到了翻译问题。 我们的翻译可以在 MaterializationStrategy 设置为 Copy 的开发人员模式下正常工作和加载。

当我们部署到生产环境时,我们运行以下命令:

bin/magento 维护:启用 作曲家安装 bin/magento 缓存:干净 bin/magento 缓存:刷新 bin/magento setup:upgrade --keep-generated bin/magento setup:di:compile bin/magento 设置:静态内容:部署 da_DK de_DE en_US es_ES fr_FR it_IT nl_NL nb_NO sv_SE fi_FI bin/magento 缓存:干净 bin/magento 缓存:刷新 bin/magento 维护:禁用

问题是在 Minicart 中和结帐期间无法进行翻译。丹麦语翻译会在所有语言环境中加载。

尝试在 https://floatinggrip.com 上将 af 产品添加到购物车

【问题讨论】:

    标签: translation magento2 production


    【解决方案1】:

    发现这个问题:https://github.com/magento/magento2/issues/7862

    来自 Magento 对 js 翻译生成的静态内容部署优化的错误。

    解决方法如下:

    php bin/magento setup:static-content:deploy --theme=Magento/luma en_US
    php bin/magento setup:static-content:deploy --theme=Magento/luma nl_NL
    php bin/magento setup:static-content:deploy --theme=Magento/luma fr_FR
    

    用你的主题替换,不要忘记后端主题:

    php bin/magento setup:static-content:deploy --theme=Magento/backend en_US
    

    【讨论】:

      猜你喜欢
      • 2022-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-07
      • 2018-12-22
      相关资源
      最近更新 更多