I am trying to format a label in two languages in a way they appear on one line and not stacked in ArcGIS any ideas? Maplex Stacked label feature is not ticked so this does not help. This is how they currently appear when labelled with the following python code:

River Corrib
Abhainn Na Gaillimhe

        s =[ENG_NAMED_RIVER]
        s = s.title().upper()

        if ([GAELTACHT_AREA]) == "Y":
            return "<ita>"  +  ([GLE_NAMED_RIVER]) + "</ita>"
        elif ([GAELTACHT_AREA]) == "N":
            if [GLE_NAMED_RIVER] is None and [ENG_NAMED_RIVER] is not None:
                return (s)
                return (s) + '\n' + " " + "<ita>"  +  ([GLE_NAMED_RIVER]) + "</ita>"
    except AttributeError:

But I just want the label to read like:

River Corrib Abhainn Na Gaillimhe

  • Welcome to GIS StackExchange! As a new user, please take a few minutes to take the Tour. I also recommend checking out the formatting options for posts to ensure that your code comes through clearly on any future questions.
    – SMiller
    Jul 12, 2018 at 13:28

1 Answer 1


The \n is a newline character, so it automatically creates a second line at that point. Remove it from the line return ( s ) + '\n' + " " + "<ita>" + ( [GLE_NAMED_RIVER]) + "</ita>".

  • Quick reminder: If this works as a solution for you, please remember to come back and mark it as a helpful (vote up) and/or accepted answer (checkbox).
    – SMiller
    Jul 12, 2018 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.