# python: declare_var URL: https://generaltranslation.com/en-GB/docs/python/api/declare-var.mdx --- title: declare_var description: API reference for the declare_var function --- ## Overview `declare_var` wraps a dynamic value with a GT variable marker so that translation engines can preserve the variable in the translated output. ```python from gt_flask import declare_var # or from gt_fastapi import declare_var greeting = declare_var("Alice", name="user") ``` ## Reference ### Parameters ### Returns `str` — an ICU select construct that wraps the value as a GT variable marker. *** ## Notes * Use `declare_var` for values that change at runtime (e.g. user names, counts). * See also [`derive`](/docs/python/api/derive) for values known at build time. * Use [`decode_vars`](/docs/python/api/decode-vars) to extract the variables back from a marked string.