Skip to content

Commit

Permalink
feat(lang): Add multiple language configuration
Browse files Browse the repository at this point in the history
Signed-off-by: hoangnt2 <[email protected]>
  • Loading branch information
hoangnt2 committed May 8, 2023
1 parent bcc464b commit 182182f
Show file tree
Hide file tree
Showing 18 changed files with 6,636 additions and 179 deletions.
20 changes: 6 additions & 14 deletions src/contexts/public.context.tsx → next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@
// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

import React, { createContext, useState } from 'react';

export const PublicContext = createContext<any> ('');

const PublicContextProvider = ({ children }: any) => {
const publicContextData = {
}

return (
<PublicContext.Provider value={publicContextData}>{children}</PublicContext.Provider>
);
}

export default PublicContextProvider;
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'ja', 'zh', 'vi'],
}
}
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

const { i18n } = require('./next-i18next.config')

const nextConfig = {
reactStrictMode: true
reactStrictMode: true,
i18n,
}

module.exports = nextConfig
Loading

0 comments on commit 182182f

Please sign in to comment.