Skip to content

Commit b13636a

Browse files
committed
One Language Code Chapter
1 parent 7b55377 commit b13636a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Projects _must_ include some form of unit, reference, implementation or function
8383
* [Misc](#misc)
8484
* [Native & Host Objects](#native)
8585
* [Comments](#comments)
86+
* [One Language Code](#language)
8687

8788

8889
## Idiomatic Style Manifesto
@@ -976,6 +977,32 @@ Projects _must_ include some form of unit, reference, implementation or function
976977
* End of line comments are prohibited!
977978

978979

980+
10. <a name="language">One Language Code</a>
981+
982+
JavaScript needs to be written in one language as their native instructions are already in English.
983+
984+
Even if you have any difficulty in speaking or writing English, you may struggle a bit to maintain the readability of your code.
985+
986+
This principle is even more important in an Open Source project. This way you should consider comments as well.
987+
988+
Notice that variable contents are not included in this rule in small or specific projects, but you should consider [localization](https://en.wikipedia.org/wiki/L10n) in bigger or Open Source projects.
989+
990+
```javascript
991+
// Bad
992+
function calculaValor(arg1, arg2) {
993+
var retorno = arg1 + arg2;
994+
return retorno;
995+
}
996+
997+
// Good
998+
console.log('Hello World');
999+
1000+
// Good as well
1001+
console.log('Oi Mundo');
1002+
1003+
```
1004+
1005+
9791006

9801007
## Appendix
9811008

0 commit comments

Comments
 (0)