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..
hello. is there any way to add en_GB locale? Do I need to setup new store for this? Or maybe can I c
hello. is there any way to add en_GB locale? Do I need to setup new store for this? Or maybe can I change somehow default en_US to en_GB? Do I need to reinstall everything for this? as I understand en_US and en_GB can't live together because in spy_url
database table field url
is unique. And if we are going to add (using default csv import for example) some new categories with new urls for en_GB it will have the same url key? With en
. It is confusing.
Comments
-
0
-
I have added new
en_GB
locale instores.php
like this'locales' => [ // first entry is default 'uk' => 'en_GB', 'de' => 'de_DE', 'en' => 'en_US', ],
Also added new store
$stores['GB'] = [ 'queuePools' => [ 'synchronizationPool' => [ 'GB-connection', ], ], 'storesWithSharedPersistence' => [], ] + $stores['DE'];
Than I need to add some new categories for example.
I added them in CSV just for testing and setup localizable attribute values foren_GB
but import fails because of unique field. It takes the first part of locale (en
in our case) here\Spryker\Zed\CategoryDataImport\Business\Model\CategoryWriterStep::findOrCreateNode L:148
. And it is the same as foren_US
. My assumption is that the url key for locale it should take from locales array instores.php
? What if i would like to addde_AT
locale? It will fail as well becausede
already exists inspy_url
table...0 -
Yes, it is a limitation that we are planning to remove in the future. The workaround for now is to create an imaginary locale in your case
gb_GB
so that the logic will not fail.0 -
but in this case it is impossible to create at least admin user with this locale because this locale doen't exist in
spy_locale
table0 -
and it can't create locale transfer object
0 -
and also if i want to import smth from akeneo for example - it will not work because from akeneo i will receive en_GB. this is not a solution
0 -
the only way to resolve it for now as I see - is to remove en_US store
0 -
I'm not a developer, but maybe you could override vendor/spryker/locale/src/Spryker/Zed/Locale/Business/Internal/Install/locales.txt on the project level and make some mapping between en_GB from Akeneo and gb_GB in Spryker.
0 -
yes it is also a possible solution. but in this case i need to add this mapping everywhere. at least in all Akeneo import processes. as for me this is "ΠΊΠΎΡΡΡΠ»Ρ" if you know what i mean
0 -
Yep, agree.
0 -
the only way to resolve it for now as I see - is to remove en_US store
if you donβt need en_US store - then thatβs the cleanest approach, thought you need it
0 -
but it also can be an effort, depending how much you rely on demo data, configuration, and so on + data migration, potentially
0 -
as i understand i need to change locales everywhere in CSV files. at least in thoose what I need.
What i need to do in configuration? just remove US store and change en_US to en_GB everywhere?0 -
just do not forget the importers that are coming as core modules. You need to override them on project level to be able to change the file location.
0 -
yeah. already found that some of them are not in data/import but in vendor... thanks
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 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
- 25 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
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random