-
-
Save BumbuKhan/122ac0d8c120fe87a738a0b38117e967 to your computer and use it in GitHub Desktop.
How to replace Yii::t('app', 'lang-key') to tag's data attribute (in notepad++)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Finf what: > ?<\?= ?Yii::t\('app',\ '(.*)'\);? ?\?> | |
Replace with: data-lang-key="\1"> | |
Example: | |
<a href="javascript:void(0)" class="weather" title="Precipitation"><?= Yii::t('app', 'weather');?></a> | |
will be raplced to | |
<a href="javascript:void(0)" class="weather" title="Precipitation" data-lang-key="weather"></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why should I replace with "\1"? #
Because regexp ("(.*)") that I've written has got the first index (from left to right)