Skip to content

tabacha/javascript-i18n-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an evaluation repository about internationalisation (i18n) in javascript. It should show a example how you translate strings in diffrent javascript i18n frameworks.

This is done to help to make an dession which framework the Openstreemap Editor id should use.

See:

openstreetmap/iD#17

Wishlist for i18n

  • open source, free license
  • the framwork should support any language (utf8)
  • should support singular, plural
  • should support something like placeholdes: "Your way is %d nodes long"
  • should be easy to translated by the crowed (translatewiki)
  • loading languages on demand
  • get default language from browser
  • switch language without restart

How to write code

There are different aproches for writing code with i18n stacks (Example code showDialog("Server "+hostname+" is not reachable.") ):

  1. showDialog(l("Server %s is not reachable.",hostname))
  2. showDialog(l("%error.server-failed"))

I prefer the 1. solution.

Solutions I found:

About

See diferent soltions for i18n in javascript in one place

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published