Translation:Arukh ha-Shulchan/Orach Chaim/682
On all eight days of Hanukkah, one should say "על הנסים-And concerning all of the miracles" in Grace after Meals, in the section concerning the blessings over the land. It should be done in the following way: One should say "נודה לך-we thank you" until "ובכל שעה-at all times". After one finishes, they should say "ועל הנסים-for the miracles" until "לשמך הגדול-to your Holy Name". Then they should continue with"...ועל הכל ד' אלקינו אנחנו מודים לך- For all of the good Hashem our Lord gives us, we thank you..."
And thus is the case with the prayer "מודים-we thank You", which we should recite until "קוינו לך-we put our hope in You". (Then we should say) "ועל הנסים-And concerning all of the miracles" which we say until the end, and continue with (the rest of our normal prayers which continue as follows:) "...ועל כולם... וכל החיים יודוך סלה- And for everything...And all of life will acknowledge You Selah"
Because these prayers only include thanks, as "על הנסים" is (in it's essence) thanks, על הנסים was fixed within the thanksgiving section (of the daily prayer).
This is not the case concerning יעלה ויבא, (The prayer said on Rosh Chodesh) - it is considered an actual prayer which is (therefore) fixed in the Prayer of רצה- "We beseech You"
And it seems to me, that the text ועל הנסים (And for the miracles...) is configured so because the preceding prayers are ones of thanks, and this is additional to them. Concerning those prayer books that state simply על הנסים (without "and"), it seems that the "and" ('ו') should be added when said.
One should say "כשעמדה... הרשעה - When the wicked Syrian-Greek kingdom rose against Israel...", and vocalize the 'Reish' (ר) with a 'Shva' (ְ) , and the 'Shin' (ש) and 'Ayin' (ע) with a 'Kuhmatz' (ָ) [making the pronunciation 'Hor-Shuh-Uh']. One should also say the phrase "להשכיחם תורתך, ולהעבירם חוקי רצוניך - to cause them to forget Your Torah, and remove them from Your statutes..." without the 'Mem' (מ) (Magen Avraham). Some do write to say 'Chukei - חוקי' with a 'Mem', as Michukei - מחוקי (Pre Chadash). This is how we say it, since it is a more straightforward grammatical phrasing.
We further say "כשעמדה... על עמך ישראל - When the wicked...rose...upon Your nation Israel" there is no need to refer to the people at the beginning of the sentence by saying "כשעמדה עליהם - When they were risen upon by the wicked...", since that would be redundant, as the sentence specifies afterward "upon Your nation Israel".
At the end of this prayer one says "וקבעו שמונת ימי חנוכה אלו - they established these eight days of Chanukkah", unlike those who say simply "שמונה ימים אלו - these eight days", without mention of Chanukkah, as that is incorrect. One should mention the entire matter at hand explicitly (see there [IN MAGEN AVRAHAM?]).
"ועל התשועות ועל המלחמות - on the salvation and the battles" is also said. Some add "ועל הנפלאות - and on the wonders". It seems to me that on Chanukkah one should say "ועל המלחמות - on the battles" because the Chashmanoyim (Hasmoneans) fought against Antiochus, however on Purim, when there was no war, one should say "ועל הנפלאות - and on the wonders".
We say "כשם שעשית לאבותינו - like You have done for our forefathers". This is unlike our teacher the Beis Yosef, who writes that
- "One does not say "כשם שעשית - like You have done", and instead finishes with "ועשית עמהם נסים וגבורות בימים ההם - You had performed for them miracles and mighty acts in those days". Others state that the first phrase is indeed said."
Until here is the quote. The reason for the first opinion is that the use of "כשם - just like" implies that just as this was done for our forefathers so should it be done for us. This would make the phrase a request, and there is no petitioning for one's needs in the last three blessings of the prayer. The second opinion that allows the phrase to be said, which is our custom, is arguing that a communal need is different, as we see that the prayers during the ten days of repentance include the requests "וכתוב" inscribe us [for good life]" and " ובספר חיים - And in the book of life..." [which are within the final three blessings].
If one forgot על הנסים, whether it was during their prayers or during Grace after Meals, they need not go back and repeat it, since it is not like יעלה ויבא, which one says on the first day of the new month (Rosh Chodesh) and during the intermediary days (Chol Hamoed) specifically because an additional sacrifice was required [in the Temple in Jerusalem]. This is not the case by Hanukkah, because it's essence is only to show gratitude.
Nevertheless, if one remembered in the very blessing in which it was fixed, the law is that as long as he is at the point of ברוך אתה- Blessed are you (and did not yet say God's Name), if he remembers he goes back [and recites it].
Although one is not required to go back (if he remembered after saying G-d's name), it is nevertheless true that in Grace After Meals, when one says the 'הרחמן - Harachmon' he should append at the end of that section: הרחמן הוא יעשה לנו נסים נפלאות, כשם שעשית... בימי מתתיהו 'The All Merciful One should perform for us miracles and wonders as he did for our forefathers in days of Matisyahu...' until the end. Similarly, when in the prayer one is able to say על הנסים after the יהיו לרצון section (Taz).
On Shabbos one is also required to say על הנסים in the מוסף - Mussaf prayer. The same is true for the Mussaf prayer of Rosh Chodesh Tevet (the first day of the month of Tevet). Even though there is no מוסף enacted specifically for Chanukkah - nevertheless on a day that requires four times of prayer Chanukkah is mentioned at each of these times.