R
Refine

ask-any-question

Resource names i18n translate

Rraw-harlequin6/8/2023
I saw that refine adds an S at the end of resource name, do you know a way i can change this ? we need to use a translation for the resource name in the sidebar menu.
Kkapa.ai6/8/2023
Hi @kerolos.salib. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Kkapa.ai6/8/2023
---------------------- Yes, you can customize the label of a resource in the sidebar menu by using the meta.label property in the resources array. Here's an example of how to set a custom label for a resource:
resources={[
{
name: "companies",
list: "/companies",
icon: <InfoCircleOutlined />,
meta: {
label: "Your Custom Label", // Replace this with your desired label or translation
},
},
// ... other resources
]}
resources={[
{
name: "companies",
list: "/companies",
icon: <InfoCircleOutlined />,
meta: {
label: "Your Custom Label", // Replace this with your desired label or translation
},
},
// ... other resources
]}
By setting the meta.label property, you can override the default behavior of adding an "s" at the end of the resource name in the sidebar menu. You can use this property to provide translations or custom labels for your resources. For more information, refer to the Resources documentation (https://refine.dev/docs/tutorial/understanding-resources/index/#what-is-resource). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
Resources | refine
In Unit 2.4, we defined a resource to create our CRUD pages with the Inferencer component but did not explain how it works. We will take care of that in this unit and thoroughly explain the resources prop of the `` component using mock components.
Kkapa.ai6/8/2023
<@503618532991565835> kapa.ai is still learning and improving, please let us how it did by reacting below
Uunderlying-yellow6/8/2023
If you use the i18nProvider, you can change the whole text of the screen by changing the translation key on translation json file. https://refine.dev/docs/api-reference/core/providers/i18n-provider/
Rraw-harlequin6/19/2023
I actually use it but it does not working for the label of resources. resources={[ { name: "dashboards", list: "/", meta: { label: t("renewableEnergy.park"), }, }]} It shoes the path to the translation but not the content. and if i use the same path in difrent compoents it shows the content. Maybe bcz it's in the App it self so the translation files doesn't ready yet ? I actually use it but it does not working for the label of resources. resources={[ { name: "dashboards", list: "/", meta: { label: t("renewableEnergy.park"), }, }]} It shoes the path to the translation but not the content. and if i use the same path in difrent compoents it shows the content. Maybe bcz it's in the App it self so the translation files doesn't ready yet ? @salihozdemir can you give us some indication on this, please ?
Uunderlying-yellow6/19/2023
Sorry for the late reply, we have discussed this with the core team and we created a ticket for solve this issue. We plan to release a feature on this topic this week. Please stay tuned 🙏 But if you don't want to wait, you can swizzle the <Layout> component and customize it yourself. You can find more information here: https://refine.dev/docs/packages/documentation/cli/#swizzle

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
pagination in usetablehow do i add serverside paginationWhat controls the behaviour of request backoff?I see request retries but I don't know what controls them. I basically want to disable retries for 4Not having a list page(needs maintainers attention!)Hey everyone. Is it possible to create only edit/delete/custom page without having a list page? If IUse Base64 string and conversion for simple "upload" Field inside of existing formHey everyone, I'm trying to implement a simple Upload-Field inside of an existing form which is usinHello need to include tailwind css toHello, need to include tailwind css to already existing refine.js with nextjs, ant-design ? any refe"npm install" cannot find package.json1) Used refine.new to download a bundled project 2) Unzipped the project file 3) From root of projecHow do I use useTable without a resource?Hi there, I am able to use useTable to retrieve data from a mock api as long as my array of incomingMUI Datagrid editable column - compile errorHi, i'm trying to make an editable column with MUI Datagrid, React and Refine 4.x See the list.tsx sHow to access a useState variable in a useSubscriptionHere is my code, useSubscription can't access new values of a useState variable : ```tsx const [sDynamic variable useSubscriptionHi, I have a problem, when my sessionChoose variable is updated, it doesn't take effect in the useSuAuto fill filter form in Table FilterWhen using filter form to filter data in table it does work. How can I make sure that the filter foruseInfiniteListHello. I am using useInfiniteList, how do I make it so that when I load new elements, they are addeHow to retrieve a list of elementsHello, I don't quite understand how refine works. I would like to retrieve the list of all my exerciHow do I use the token generated by the Google auth?I am using Refine with built in Google authorization process. I would like to use the token, becauseIs refine for a admin panel or for aIs refine for a admin panel, or for a whole website? Because I have to replace mainly the whole frodoes refine fully support Nextjs?I mainly use Next JS, I might go with PlanetScale for my DB instead of Supabasehey guys please who do i pitch for ahey guys, please who do i pitch for a technical article idea?Dockerfile Config for ProductionHello, I wonder if there is a dockerfile example so that I can deploy my Refine project in productio