Editorial



Internationalisation
Traduction
Congolexomatisation

I18n



  • Détection de la langue
  • Traduction des urls
  • Restriction

I18n - Détection



http://lms.vodeclic.com/fr/formation/190


  • I18n.locale
  • (:subdomain).(:domain)/(:lang)/(:action)/(:id)

I18n - Traduction 1/2



Méthodes *_paths / *_url

?> app.formation_fr_path(:sujet => 190)
=> "http://app.vodeclic.com/fr/formation/190"

?> app.formation_en_path(:sujet => 190)=> "http://app.vodeclic.com/en/course/190"

Utilise I18n.locale

?> app.formation_path(:sujet => 190)=> "http://app.vodeclic.com/en/course/190"

I18n - Traduction 2/2



routes.yml

I18n - Restriction



http_accept_language.compatible_language_from authorized_lang

translate()



  • Traduction de la plateforme
  • YML
  • Localeapp

Traduction de la plateforme



Clé - Valeur

?> translate("tools.dashboard")
=> "tableau de bord"

?> translate("tools.dashboard")
=> "课程进展统计表"

YML


de.yml

LocaleApp



  • Interface web
  • Crée les .yml

$ localeapp pull

Fetching translations:
Success!
Updating backend:
Success!

Database



  • (Relationnel)
  • AssociationLang
  • Default scope

Relationnel



  • Contenu dynamique
  • Tableur
  • Lien entre les objets

AssociationLang



  • Lien avec "Lang"
  • AR#childs
  • AR#parent
  • AR#corresponding

Default scope



?> Metasujet.all
=> [<Metasujet#1>, <Metasujet#3>, ..., <Metasujet#877>]
?> Metasujet.where(:lang => "pt").all=> [<Metasujet#647>, <Metasujet#669>, ..., <Metasujet#839>]

  • Filtre "Lang" automatique
  • Utilise I18n.locale

CopyLang



  • Duplication
  • Anticipation

Duplication



Anticipation



Neverending



Questions ? Non ?
KTHXBYE

Editorial

By Thomas Petrachi

Editorial

  • 1,236