Skip to content

How to display CMS static blocks based on store in Magento 2

I have created two stores english and german and created static blocks with different contents based on the store in admin.Block Id(test) for both stores are the same but both blocks assigned to respective stores…I need to call static block of english in phtml file. How can I do that?
if I use,$this->getLayout()->createBlock('MagentoCmsBlockBlock')->setBlockId('test')->toHtml(); nothing will display.