BUG: byteorder option in to_stata is not honoured when writing strL data
- [x] closes #58969  (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I have created a local variable to indicate whether the file is being saved to the native byteorder in two places, but am happy to calculate this once in `__init__` and store in `self` for later access if you prefer.
> but am happy to calculate this once in __init__ and store in self for later access if you prefer.

I think this would be preferable. Over time we've wanted to avoid mutating state variables in methods if possible > > but am happy to calculate this once in **init** and store in self for later access if you prefer.
> 
> I think this would be preferable. Over time we've wanted to avoid mutating state variables in methods if possible

Thanks, that's useful to know. I have now changed this. Thanks @cmjcharlton 