Configuration 如何在Magento2中添加国家/地区?

Configuration 如何在Magento2中添加国家/地区?,configuration,magento2,country,Configuration,Magento2,Country,我们有Magento 2.2.5版 我们努力使科索沃成为可能 因此: 外接数据库目录\u国家/地区XK、XK和XKX 进入/vendor/magento/zendframework1/library/Zend/Locale/Data和 编辑en.xml/it.xml和科索沃(已存在)并添加科索沃 使用控制台刷新缓存 当我们转到“管理配置”以添加“不存在可用国家/地区”时。我们还尝试添加一个测试国家,但不起作用。我们还尝试编辑/vendor/magento/module directory/etc

我们有Magento 2.2.5版

我们努力使科索沃成为可能

因此:

  • 外接数据库目录\u国家/地区XK、XK和XKX
  • 进入/vendor/magento/zendframework1/library/Zend/Locale/Data和 编辑en.xml/it.xml和科索沃(已存在)并添加科索沃
  • 使用控制台刷新缓存
  • 当我们转到“管理配置”以添加“不存在可用国家/地区”时。我们还尝试添加一个测试国家,但不起作用。我们还尝试编辑/vendor/magento/module directory/etc/config.xml添加允许国家/地区


    我们可以怎么做?

    在Magento添加新的国家/地区非常容易,只需按照下面给出的步骤操作即可

    Step1: Open lib/zend/locale/data/en.xml
    
    Step2: Locate territories tag in this file
    
    Step3: copy one of the territory tags for the syntax and paste it within the territories tag
    
    Step4: hard part here is to add country code in this file as might not be able to find a unique one, so it’s upto you.
    
    Step5: Save this file
    
    Step6: Open table name directory_country
    
    Step7: It has predefined syntax follow then same and create a new row and enter the same country code as entered in the en.xml file in 3 columns
    
    Step8: Refresh the site’s cache.
    
    Step9: Admin > Configuration > General
    

    应在允许的国家/地区列表中选择此新国家/地区。

    在Magento中添加新国家/地区非常容易,只需按照下面给出的步骤操作即可

    Step1: Open lib/zend/locale/data/en.xml
    
    Step2: Locate territories tag in this file
    
    Step3: copy one of the territory tags for the syntax and paste it within the territories tag
    
    Step4: hard part here is to add country code in this file as might not be able to find a unique one, so it’s upto you.
    
    Step5: Save this file
    
    Step6: Open table name directory_country
    
    Step7: It has predefined syntax follow then same and create a new row and enter the same country code as entered in the en.xml file in 3 columns
    
    Step8: Refresh the site’s cache.
    
    Step9: Admin > Configuration > General
    

    应在允许的国家/地区列表中选择此新国家/地区。

    我按照下面的链接添加了一个新国家/地区


    我点击了下面的链接,它帮助我添加了一个新的国家


    不适用于我的版本有/vendor/magento/zendframework1/library/Zend/Locale/Data和Not/lib/Zend/Locale/Data/之后请清除缓存并重新生成静态内容无需重新生成静态内容、清除缓存、刷新缓存、,重新索引…不适用于我的版本有/vendor/magento/zendframework1/library/Zend/Locale/Data和Not/lib/Zend/Locale/Data/之后请清除缓存并重新生成静态内容无需重新生成静态内容、清除缓存、刷新缓存、重新索引。。。