[ 
https://issues.apache.org/jira/browse/DOXIASITETOOLS-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807905#comment-17807905
 ] 

Abel Salgado Romero commented on DOXIASITETOOLS-327:
----------------------------------------------------

Thanks! That works, but from the example and 
https://github.com/apache/maven-site-plugin/blob/d78b8da70fd186738707f14166812d721064b766/src/site/apt/examples/creating-content.apt.vm#L196
 I understand one needs to copy the whole site.xml. Wouldn't it make sense to 
have a way to avoid that duplication?

> Support multi-language for menu "name"
> --------------------------------------
>
>                 Key: DOXIASITETOOLS-327
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-327
>             Project: Maven Doxia Sitetools
>          Issue Type: Improvement
>          Components: Site model
>    Affects Versions: 2.0.0-M16
>            Reporter: Abel Salgado Romero
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>         Attachments: image-2024-01-16-23-19-41-511.png
>
>
> The new v2.0.x-MX added multi-lang / locale support to build pages, but seems 
> the `site.xml` does not allow to change the name of a menu element.
> For example, a page with "en" and "es" versions and menu "Hello", will show 
> "Hello" in the Spanish site too, no way to specify "Hola".
>  
> I peeked at the code and I see two options:
>  # Modify MenuItem to allow a sub name element like `<name 
> locale="es">Hola</name>`
>  # Allow injection of language ResourceBundle properties in the current 
> element: `<item href="hello.html" name="\{menu.item-o}" />`
> I like the second and will try to explore that, I saw the generated code 
> provides a transformer method for values, just need to find how to inject 
> custom logic there 🤔
> !image-2024-01-16-23-19-41-511.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to