That’s only the case for American English. British English places periods and commas outside the quotes, unless part of a literal quotation.