How to localize a non-product money value with storefront api in an extension?

With Liquid I am able to create an arbitrary price using a metaobject money field type. When the Liquid is rendered in the online store, the price will show in the customer’s local currency using Markets.

I am trying to do the same in a checkout extension. I want to allow someone to create a checkout extension that shows text with a random price (not tied to a product), and have that price show the correct localized value depending on the customer’s market/currency.

I found the inContext directive in the Storefront API that looks like it should localize a resource to a specific Market, however this doesn’t appear to work for metaobjects. I’m wondering how this works with Liquid but not with the API. Does Shopify just not support this yet? Is there another solution for this?

https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/markets/international-pricing