Generate translated routes for your qwik project.

Overview

qwik-translate-routes

Generate translated routes for your qwik project.

Installation

// npm
npm install -D qwik-translate-routes
// yarn
yarn add -D qwik-translate-routes
// pnpm
pnpm add -D qwik-translate-routes

Usage

CLI

npx qwik-translate-routes [path_to_dir] --translations [path_to_translation_dir_or_file]

Module

import { translateDirectoryRecursive } from "qwik-translate-routes"

translateDirectoryRecursive("./path/to/dir", [
	"./path/to/translation/file/or/dir",
])

Translation files

Translation files must be a one level deep .json file, using the main directory's directory names as keys and the translation as value.

Example

fr.json

{
	"en": "fr",
	"about": "a-propos",
	"products": "produits"
}

This translation file assumes your target directory is called en and has subdirectories (nesting doesn't matter) called about and products.

Reference

CLI

Option Shortcut Argument Description
--translations -tr ...string[] Sets what translations will be used to generate the translated directories, either a path to a dir or 1+ files.

Example

npx qwik-translate-routes [path_to_dir] --tr [path_to_italian_translations] [path_to_german_translations]

Module

/**
 * @param path A path to the directory to translate recursively (usually
 * `src/routes/en`).
 * @param translations An array of paths to `.json` translation files or an
 * array containing a single path to a translation directory.
 */
export function translateDirectoryRecursive(
	path: string,
	translations: string[]
) {}
You might also like...

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

About routes-gen is a framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. Think of it as Prisma,

Jan 2, 2023

🚏 Routes for Next.js

🚏 Routes for Next.js

next-route-map 🚏 next-route-map allows you to define a route map. It automatically generates page modules that forward original modules in build time

Sep 24, 2022

SafeCycle—a tool that keeps cyclists safe. Gone are days of weaving through busy city streets, SafeCycle finds all the bike routes for you to ensure a smooth ride wherever you want to go.

Inspiration Biking—an everyday form of travel for students and professionals across the globe. On-campus, back home, and with the people that we know

May 2, 2022

next-graphql-server is a library for building production-grade GraphQL servers using Next.js with API Routes

next-graphql-server next-graphql-server is an easy to use Next.js library for creating performant GraphQL endpoints on top of Next.js API Routes. Star

Nov 21, 2022

This plugin can be embedded in PHP application to give the web application specific routes/href

Routes Plugin PHP This plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/l

Jul 17, 2022

Ready-to-use Remix + Tailwind CSS routes and components.

Ready-to-use Remix + Tailwind CSS routes and components.

remix-blocks What is RemixBlocks? Ready-to-use Remix + Tailwind CSS routes, and UI components, all blocks: Are full-stack routes. Are independent of e

Jan 5, 2023

Bun-Bakery is a web framework for Bun. It uses a file based router in style like svelte-kit. No need to define routes during runtime.

Bun-Bakery is a web framework for Bun. It uses a file based router in style like svelte-kit. No need to define routes during runtime.

Bun Bakery Bun-Bakery is a web framework for Bun. It uses a file based router in style like svelte-kit. No need to define routes during runtime. Quick

Dec 6, 2022

Generate deterministic fake values: The same input will always generate the same fake-output.

Generate deterministic fake values: The same input will always generate the same fake-output.

import { copycat } from '@snaplet/copycat' copycat.email('foo') // = '[email protected]' copycat.email('bar') // = 'Thurman.Schowalter668@

Dec 30, 2022

This project focuses on increasing the efficiency of a hospital's patient waitlist by creating an algorithm to generate an ordered list of 10 patients with the highest chance of accepting an appointment offer.

Patients-Facility Technical Interview Requirements This application was built on Node.JS v12.14. It has not been tested on other versions. You will al

Mar 20, 2023
Owner
Alexandre Fernandez
Alexandre Fernandez
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
generate pages from markdown files with dynamic routes, 0 effort, 0 boilerplate.

next-markdown Markdown Pages for Next.js Dynamic Routes. Blog Aware. Design Your Layout Made for people having a nextjs project in ❤️ with markdown wh

François Rouault 105 Oct 11, 2022
Qwik City adapter for trpc.io

tRPC ?? Qwik City End-to-end typesafe APIs made easy with tRPC.io in Qwik City applications. Build & consume fully typesafe APIs, without schemas or c

Giorgio Boa 29 Oct 11, 2022
An e-commerce storefront starter built with Qwik and Vendure

Vendure Qwik Storefront Starter️ An e-commerce storefront for Vendure built with Qwik & Qwik City. ?? qwik-storefront.vendure.io To do Cart ✅ Checkout

Vendure 81 Dec 31, 2022
qwik.wrong-lang.click website source code

Qwik App ⚡️ Qwik Docs Discord Qwik Github @QwikDev Vite Partytown Mitosis Builder.io Project Structure Inside of you project, you'll see the following

Wrong Lang 3 Oct 7, 2022
BETA partytown-qwik

Qwik Partytown ?? This is a package that facilitates the implementation of PartyTown in Qwik. If you don't know what Qwik is See The implementation is

Leifer Mendez 7 Dec 20, 2022
Urql support for Qwik projects.

Qwik Urql ⚡️ A small library to use Urql with Qwik. ✅ Query & mutation hooks ✅ SSR ✅ Lazy loaded client ✅ Auth tokens ✅ Abort signals ✅ Re-execute que

null 15 Dec 21, 2022
Avoid CORS issues by using API Routes from Next.js

CORS Demo Avoid CORS issues by using API Routes from Next.js. Get Started Clone the repo git clone [email protected]:gregrickaby/cors-demo.git CD into co

Greg Rickaby 2 Sep 30, 2022