### Bug description

 The language choice picked in YAML (`lang: it`)renders correctly in **html**, but fails in **docx** output for table caption (lang and crossreff). 
[docx_issues.docx](https://github.com/quarto-dev/quarto-cli/files/11372291/docx_issues.docx)

````qmd
---
title: "docx_issues"
lang: it
toc: true
format:
  html:
    toc-title: Indice
    embed-resources: true # external dependencies embedded (Not in ..._files/)
  docx:
    toc-title: Indice
    embed-resources: true # external dependencies embedded (Not in ..._files/)

---

## Issue 

Rendering in **html**:

1. crossreference of table (@tbl-test) works correctly
2. and shows the title in the required language picked in YAML `lang: it` (**"Tabella 1: table title"**) 

Rendering in **word** INSTEAD:

1. crossreference of table (@tbl-test) does **NOT** work
2. and shows the title **NOT** in the required language picked in YAML `lang: it`(**"Table 1: table title"**) 
 
```{r}
#| label: tbl-test 
#| echo: false
#| warning: false
#| output: true
#| tbl-cap: "table title"
library(quarto) 
library(flextable) 
library(magrittr)  
 ft <- mtcars %>% head() %>% 
  flextable() 
 
 ft
```

+ R version 4.2.2 (2022-10-31)
+ R Studio Version 2022.12.0+353 (2022.12.0+353)
+ Quarto Version ‘1.2.258’
````



[✓] Checking Quarto installation......OK
      Version: 1.2.258
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.13
      Path: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
      Jupyter: 5.2.0
      Kernels: python3, python2

(-) Checking Jupyter engine render....Traceback (most recent call last):
  File "/Applications/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/Applications/quarto/share/jupyter/notebook.py", line 16, in <module>
    import nbformat
ModuleNotFoundError: No module named 'nbformat'
[✓] Checking Jupyter engine render....OK

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cscheid
2023-05-02T10:53:06Z
Lulliter
bug crossref
v1.4
open
wrong language & crossref output when format:docx
https://github.com/quarto-dev/quarto-cli/issues/5383