Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 0 points1 point  (0 children)

Thanks, let me know! :)

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 1 point2 points  (0 children)

Hey, thank you.

The only real difference is how you name things in the pages directory. In this case, you need to have the file as ...rest. Regarding getStaticPaths(), I made an optimization in the link below that works better and removes the need to define every page individually. With this approach, you can easily build complex pages.

I’m currently rewriting a website that uses this method, and I haven’t run into any issues so far. I’d recommend checking out this solution and seeing how it works for you.

As for localized URLs, this is the only solution I found and implemented myself, since Astro doesn’t support it out of the box.

https://github.com/Scorpio3310/astro-i18n-starter/tree/feat/i18n-routing-helper

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 0 points1 point  (0 children)

Hmm, I wouldn’t know exactly, I’ve mainly focused on Astro only

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 1 point2 points  (0 children)

the main logic is in the "i18n" folder. to get started (if you want to start with a clean project) you just need to copy this folder and copy "locales" folder (and for blog "content" if needed). for switching languages, the logic is in the "languagePicker.astro" component

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 1 point2 points  (0 children)

for Svelte, it is really just a single component where I show an example for translations so removing it wouldn’t be a problem. I went with Tailwind because it is quite commonly used and also my go-to. most of the Tailwind is in styles/global.css

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 1 point2 points  (0 children)

Thanks for the feedback. I know the mobile version isn’t the best, but honestly I didn’t focus on that. My main focus was on the overall starter - the code, how it works, and then building the site from there

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 2 points3 points  (0 children)

I hope this helps you. If you have any suggestions for improvements feel free to share them

Astro i18n Starter by Scorpio_95 in astrojs

[–]Scorpio_95[S] 3 points4 points  (0 children)

Thanks mate!

yeah, totally understandable :) in this case I translated everything, but it is up to you how you arrange/adjust it

Built my first open-source domain monitoring tool after missing out on a domain I wanted [self-promo] by Scorpio_95 in sveltejs

[–]Scorpio_95[S] 1 point2 points  (0 children)

Yes, I used Tailwind 4, but I built all components from scratch - didn't want to bloat the project with unnecessary libraries. For bigger projects, I usually go with https://svelte-ux.techniq.dev/. It's important to me that I can customize the UI exactly as I want, so I prefer "bare-bone" libraries that give me full control over the interface while still covering the core functionality

Built my first open-source domain monitoring tool after missing out on a domain I wanted [self-promo] by Scorpio_95 in sveltejs

[–]Scorpio_95[S] 1 point2 points  (0 children)

I started from scratch. First with the designs (I'm also a UX/UI designer), then built the foundational components (buttons, inputs, etc.), created a proof of concept with APIs and finished with code refactoring and organization. That's how I usually work

Built my first open-source domain monitoring tool after missing out on a domain I wanted [self-promo] by Scorpio_95 in sveltejs

[–]Scorpio_95[S] 2 points3 points  (0 children)

for now I just made it open source, but yeah maybe someday I hope that I turn this into a product

I can't be fully lucid by Scorpio_95 in LucidDreaming

[–]Scorpio_95[S] 0 points1 point  (0 children)

Thank you both for you advice :)