I've always been curious to know the translation of this sentence but I've never been able to translate it
So it's a very famous line from a very famous poem：
It means: 独自远离家乡难免总有一点凄凉，[Leaving home alone is a little melancholic, so homesick]
每到重阳佳节倍加思念远方的亲人。[When it is ChongYang festival，(which is Sept.9th in the lunar calendar, a very "lucky festival"), I begin to miss my family that lives far away]
(These first two lines above are what is written on your flute)
远远想到兄弟们身佩茱萸登上高处，[From afar, I think about my brothers wearing cornel to higher grounds (I vaguely recall its a tradition in the Chongyang festival to 登高)]
也会因为少我一人而生遗憾之情。 [They will have regrets that I'm not there with them (I won't get into 插茱萸 because that's a long explanation of traditions)]
The poet wrote very poetically and this is not the word by word translation. Generally, the poet is lonely and is home-sick
Hope that helps
Perhaps OP and others may appreciate the two lines better if the words and phrases are translated as verbatim as possible, with necessary prepositions for sentential flow. Pinyin is incorporated for ease of reading.
Line #1 - 独在异乡为异客 (Dú zài yì xiāng wéi yì kè)
独在 = Alone in...
异乡 = a foreign town...
为 = as a...
异客 = foreigner.
Line #2 - 每逢佳节倍思亲 (Měi féng jiā jié bèi sī qīn)
每逢 = At every...
佳节 = festive season...
倍 = doubly...
思 = miss...
亲 = relatives / loved ones.
In case too many characters may overwhelm the new contributor, those on the flute are:
独在异乡为异客 (the first line, i.e., the right vertical line, reading from top to bottom)
每逢佳节倍思亲(the second line, i.e., the left vertical line).
Also in case the OP is interested in, those characters are simplified Chinese, so the flute should be a modern product, although having these two lines of poem is very appropriate.