View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
17163Feature requestsTranslationpublic2021-11-25 09:57
ReporterDenisChenu Assigned Togalads  
PrioritynoneSeverityfeature 
Status assignedResolutionopen 
Summary17163: Allow translation by DB
DescriptionCurrently : there are solution to update some string via TWIG but there are no easy solution to replace some string except cvia edition po file.

I think it can be great to have a way to have it via DB

Additional InformationMy idea

Create our own LsCDbMessageSource : (unsure needed)

Add it to internal
```
        'messagesgettext' => array(
            'class' => 'CGettextMessageSource',
            'cachingDuration'=>3600,
            'forceTranslation' => true,
            'useMoFile' => true,
            'basePath' => __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'locale'
        ),
        'messages' => array(
            'class' => 'LsCDbMessageSource',
            'cachingDuration'=>3600,
            'forceTranslation' => true,
        ),
```

https://www.yiiframework.com/doc/api/1.1/CMessageSource#translateMessage-detail

register to onMissingTranslation event to return `Yii::t('', $sToTranslate, array(), 'messagesgettext', $sLanguage)`

Or use category ?
TagsNo tags attached.
Bug heat2

Relationships

related to 09649 new Plugin event : update "default core string" 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2021-03-07 21:37

administrator   ~62831

That would be nice.

Issue History

Date Modified Username Field Change
2021-03-04 17:16 DenisChenu New Issue
2021-03-04 17:16 DenisChenu Relationship added related to 09649
2021-03-07 21:37 c_schmitz Note Added: 62831
2021-11-25 09:57 galads Assigned To => galads
2021-11-25 09:57 galads Status new => assigned