Skip to content

Instantly share code, notes, and snippets.

@btpoe
Last active October 31, 2018 15:19
Show Gist options
  • Save btpoe/7d7da07137b227319ca2a9e2aa863cad to your computer and use it in GitHub Desktop.
Save btpoe/7d7da07137b227319ca2a9e2aa863cad to your computer and use it in GitHub Desktop.
i18n example
import text from 'text_en.json?i18n';
export default [
{
path: `/:country(${text.country})/:state/:city/${text.profile}/:category/:name-:bbbId-:businessId`,
id: 'businessprofile',
component: BusinessProfile,
},
{
path: `/:country(${text.country})(/:state)(/:city)/${text.categories}(/:letter)`,
id: 'categories',
component: CategoriesPage,
},
];
{
"language": "en",
"country": "us|ca",
"categories": "categories",
"profile": "profile"
}
{
"language": "es",
"country": "mx",
"categories": "categorias",
"profile": "perfil"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment