What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all! I have a problem with adding additional locale on frontend to the existing store. I want to
Hi all!
I have a problem with adding additional locale on frontend to the existing store. I want to add pl_PL locale to the demo US store. After adding it to the config/Shared/stores.php file
$templates['US'] = [ // different contexts 'contexts' => [ // shared settings for all contexts '*' => [ 'timezone' => 'America/Los_Angeles', 'dateFormat' => [ // short date (11.14.12) 'short' => 'm/d/Y', // medium Date (Feb 01. 2012) 'medium' => 'M d. Y', // date formatted as described in RFC 2822 'rfc' => 'r', 'datetime' => 'Y-m-d H:i:s', ], ], // settings for contexts (overwrite shared) 'yves' => [], 'zed' => [ 'dateFormat' => [ // short date (12-28-2012) 'short' => 'm-d-Y', ], ], ], 'locales' => [ // first entry is default 'en' => 'en_US', 'pl' => 'pl_PL', ], // first entry is default 'countries' => ['US'], // internal and shop 'currencyIsoCode' => 'USD', 'currencyIsoCodes' => ['USD'], ] + $templates['default'];
$stores['US'] = [ // different contexts 'contexts' => [ // shared settings for all contexts '*' => [ 'timezone' => 'America/Los_Angeles', 'dateFormat' => [ // short date (11.14.12) 'short' => 'm/d/Y', // medium Date (Feb 01. 2012) 'medium' => 'M d. Y', // date formatted as described in RFC 2822 'rfc' => 'r', 'datetime' => 'Y-m-d H:i:s', ], ], // settings for contexts (overwrite shared) 'yves' => [], 'zed' => [ 'dateFormat' => [ // short date (12-28-2012) 'short' => 'm-d-Y', ], ], ], 'locales' => [ // first entry is default 'en' => 'en_US', 'pl' => 'pl_PL', ], // first entry is default 'countries' => ['US'], // internal and shop 'currencyIsoCode' => 'USD', 'currencyIsoCodes' => ['USD'], 'queuePools' => [ 'synchronizationPool' => [ 'US-connection', ], ], 'storesWithSharedPersistence' => [], ];
it show up in the dropdown on the page, but when I'm choosing it, I'm getting below error.No route found for "GET <http://yves.us.spryker.local/pl>" (from "<http://yves.us.spryker.local/>")
Any idea why is it happening? I cannot find anything in the docs regarding this.
Comments
-
Did you edit product data in import files to have this additional locale?
0 -
Nope, I didn't touch anything besides the glossary and store config itself. Does spryker need this to run the HP?
0 -
This is an internal usage doc I created a while ago and I'm not sure if it's still up-to-date.
But it can direct you in the right direction probably.[Internal usage] How to add a new store + locale This guide is not intended to add new store into already running system. It will work only during development and only with expectation that complete project resetup is acceptable. In this how-to I was adding FR store and fr_FR locale for testing needs. In general, to add a new store and a new locale next steps need to be done: 1. You need to modify next files with product data to add new localized attributes and entries: data/import/common/common/category.csv data/import/common/common/cms_block.csv data/import/common/common/cms_page.csv data/import/common/common/content_banner.csv data/import/common/common/content_navigation.csv data/import/common/common/content_product_abstract_list.csv data/import/common/common/content_product_set.csv data/import/common/common/glossary.csv data/import/common/common/navigation_node.csv data/import/common/common/product_abstract.csv data/import/common/common/product_concrete.csv data/import/common/common/product_discontinued.csv data/import/common/common/product_image.csv data/import/common/common/product_image_internal.csv data/import/common/common/product_label.csv data/import/common/common/product_management_attribute.csv data/import/common/common/product_option.csv data/import/common/common/product_search_attribute.csv data/import/common/common/product_set.csv 2. Copy data/import/common/DE to data/import/common/FR with all its content and change all files inside to reflect FR store. 3. Modify install recipes to add new folder you created\copied at the previous steps: data/import/common/catalog_setup_import_config_EU.yml data/import/common/combined_product_import_config_EU.yml data/import/common/commerce_setup_import_config_EU.yml data/import/common/content_management_import_config_EU.yml data/import/common/merchandising_import_config_EU.yml data/import/common/special_product_types_import_config_EU.yml data/import/local/full_EU.yml 4. Modify config/Shared/stores.php to add new store and locale. 5. Modify src/SprykerConfig/CodeBucketConfig.php to add new store. 6. Modify deploy.dev.yml to add new ES and Redis indexes, endpoints, DB and RMQ vhosts. 7. If your project has store-specific configuration, adjust it as well in config_default_*_FR.php 8. Run docker/sdk boot deploy.dev.yml and docker/sdk reset to re-create all containers with all the changes you made.
0 -
thanks! will try it!
0 -
@valerii.trots Super helpful! Did you mean if we create a store through above steps can not be deployed on production? What's the right approach to add a new store to existing running system?
0 -
Think you also need to update Router configuration:
vendor/spryker/router/src/Spryker/Yves/Router/RouterConfig.php
and add new Locales and Stores
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random