Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Unable to configure non-CRUD pages in i18n configuration file #5873

Closed
linkscope opened this issue Apr 20, 2024 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@linkscope
Copy link

Is your feature request related to a problem? Please describe.

Hi, I don't know how to configure i18n page titles for non-CURD pages, I didn't find a solution through Refine Docs AI or the appropriate documentation, if there is a solution please let me know how to solve the problem, thanks!

For example, I have a /member/recharge page, and I would like to be able to implement it this way in the config file:

{
 "documentTitle": {
    "default": "refine",
    "suffix": " | Refine",
    "member": {
      "create": "create new member | Refine",
      "recharge": "member recharge | Refine"
    },
  }
}

Can this writing style be supported? If not is there a corresponding solution?

Thanks, team

Describe alternatives you've considered

No response

Additional context

No response

Describe the thing to improve

Configure non-CURD pages in i18n configuration file

@linkscope linkscope added the enhancement New feature or request label Apr 20, 2024
@aliemir
Copy link
Member

aliemir commented Apr 21, 2024

Hey @linkscope, document titles are determined by resource and action values and might not work as you expected in custom routes, but as a solution you can use the useDocumentTitle hook from the Refine's router provider packages to set a custom title for your pages. Let us know if this works for you.

@linkscope
Copy link
Author

@aliemir Thanks for the answer, is this usage reflected in the documentation? I feel like there are a lot of practical application scenarios that seem to be missing from the documentation.

@aliemir
Copy link
Member

aliemir commented Apr 22, 2024

@linkscope, useDocumentTitle is exported from router packages and they have a section for it in the docs but I think we can add some more references to it in other parts of the documentation 🤔 Thank you for the feedback!

@omeraplak omeraplak changed the title [FEAT] Unable to configure non-CURD pages in i18n configuration file [FEAT] Unable to configure non-CRUD pages in i18n configuration file Apr 22, 2024
@linkscope
Copy link
Author

@aliemir That's cool! Thanks for your patient reply, the issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants