This topic contains 1 reply, has 2 voices, and was last updated by Przemek Nogaj 6 years, 7 months ago.
- Topic
Hi Team,
i have a situation wherein i have to give a different label for a default message key which is present in oro_translation_key table mapped with oro_translation table. Now my issue is how to change the value for the given message key(ex : oro.organization.businessunit.owner.label) present in table from default value with another value without changing it in Database by updating table row.
When i try using the same domain structure(i.e oro.organization.businessunit.owner.label) in a config file (ex: messages.fr_FR.yml ) and clearing the cache, it does not read from config file but reads from Database. Now if i change the key value from translation_key table to something else (ex: From oro.organization.businessunit.owner.label to oro.organization.businessunit.owner1.label) & then cache clear . Then Translation would take value from the messages.fr_FR.yml where i had defined the same key (oro.organization.businessunit.owner.label) as it was not able to find the matching key in Database.So is there a way wherein we can give priority to check translation labels for all messages through messages.{lang}.yml configuration file & fetch the translation value , if not found in any of those message.{lang}.yml config file then to check in Database.
The reason why i am concerned with this approach is ,later even if the DB is changed to a new DB just by configuration files i will be able to retain translations rather than maintaining a track of some update queries and running it each time i change application to connect a new DB .
I tried to look at translation Bundle present in Oro under Vendor Directory & also Symfony Translation code but could not get much clarity on how to go about with changing the priority. i could see that a catalog is used which helps in maintaining a cache file which contains all those messages for use by application.
Please help if possible on how to change the priority from Database to the configuration files.
Application related Info:
Application Version: 2.3 (latest)
Application Type : OroCRM , OroPlatformEnvironment Used:
Os : Cent Os 7.1
Database: Mysql 5.7
Php: Version 7.1Thanks & Regards,
Shreyas S
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.