This usually happens when you use template compilation, because ezini gets compiled to just a static value. This is done to increase speed and should work this way.
You can probably get this work by disabling template compilation, but I suggest you to try this:
The line you wrote worked fine. I'm using v. 3.6.1.
But I still can't get any further with my problem. I want to fetch the locale settings from RegionalSettings, and then fetch the currency from the specified locale. If someone uses greek as locale, the snippet should get the currency settings from the greek .ini file. What I'm trying to do is calculate a products price in Euro, using the eurofxref extension (which by the way is excellent).
{def $ini_file=ezini('RegionalSettings', 'Locale')|append('.ini')}
{def $currency_short_name=ezini('Currency', 'ShortName', $ini_file)}
{let rates=fetch( 'eurofxref', 'fxref' )}
Your currency in Euro: {rates.fx.$currency_short_name|110n( 'number' )}
{/let}