ruby on rails - Locale based information on International site -


we're building education platform. site it's going published in different countries, having each country own subfolder. example,

france: http://myedusite.com/fr/

spain: http://myedusite.com/es/

  • the site has courses belonging providers
  • courses have different themes (arts, business, science) , these themes have sub-themes (i'm planning use ancestry have tree structure model)

courses

providers can create courses if have account. courses created published in domain created. example, if i'm course's provider , create account in http://myedusite.com/fr/, courses create should published in http://myedusite.com/fr/.

for purpose, thought of defining country model field iso_3166. field populated country codes defined in iso 3166.

then, courses have target_country (class: country), enabling possibility of choosing course published (if course's target_country france should visible in http://myedusite.com/fr/).

themes

for themes happens similar, each country site exists there can different themes. when user arrives http://myedusite.com/xx/, themes existing in country "xx" shown. implies each theme should belong country.

on other hand, each course have 1 theme.

for dealing country related information (for example loading cities country) thought of using country gem.

from business perspective, have chosen bottom-top approach, meaning necessary things built now, adding features it's needed.

i see reasonable strategy make site international. i'm afraid of of choosing wrong , having trouble on future new features arrive. have flexibility possible.

it's first time design international project. approach i've thought of usual in kind of sites? should pay attention didn't mention?

i use navigator.language locale , redirect js whatever url want, or add query string. in case since want language should split first, redirect. in case use full locale code because en different au, us, ca, gb , on, you'd want consider doing same if displaying prices, dates , on.

i think there way rails too, see accept-language, accept charset headers.

once pass language/locale controller can filter data required.

this leaves room nice seo tricks if set custom 404 page, engines go this.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -