Short answer. It depends which kind it is. Civil Code Article 944 says an education legacy lasts until the beneficiary comes of age, or longer if they are diligently finishing a course already begun. A support legacy instead lasts for the beneficiary's entire lifetime, unless the will itself sets a different term.
What the law says
A legacy for education lasts until the legatee is of age, or beyond the age of majority in order that the legatee may finish some professional, vocational or general course, provided he pursues his course diligently.
Civil Code, Article 944 — A Legacy for Education or Support. Read the full provision →
What the law says
A legacy for support lasts during the lifetime of the legatee, if the testator has not otherwise provided.
Civil Code, Article 944 — A Legacy for Education or Support. Read the full provision →
How long an education legacy runs
Article 944 sets the term directly: a legacy for education lasts until the legatee is of age, or beyond the age of majority in order that the legatee may finish some professional, vocational or general course, provided he pursues his course diligently. So the default cutoff is legal age, but the legacy keeps running past that point if the beneficiary is genuinely still working through a course, and only for as long as they pursue it diligently — the extension is conditional on real, continued effort, not automatic.
How long a support legacy runs
A different rule governs support: a legacy for support lasts during the lifetime of the legatee, if the testator has not otherwise provided. Unless your will sets its own term, support is meant to last for as long as the beneficiary lives, not for a fixed number of years or until some age. The phrase "if the testator has not otherwise provided" also means you can set a shorter or different duration yourself, and that instruction would control instead of the lifetime default.
If you never fixed an amount
The article also covers what happens when the will is silent on the amount: if the testator has not fixed the amount of such legacies, it shall be fixed in accordance with the social standing and the circumstances of the legatee and the value of the estate. So an unfixed education or support legacy is not void for vagueness; it is filled in by looking at who the beneficiary is, their circumstances, and what the estate can actually bear.
If you were already supporting them
Where you had an existing habit of giving, the article ties the legacy to it: if you used to give the legatee a certain sum of money or other things by way of support, that same amount is deemed bequeathed, unless it is markedly disproportionate to the value of the estate. In practice, whatever you were already regularly providing becomes the baseline for the legacy, so long as the estate can reasonably sustain it at that level.