Learning a language for economic or practical reasons doesn't mean you forget your own language. The silicon valley example is more likely to make English evolve than to make a hundred other languages extinct.
In the case of Sweden, which is already a small population, it must be difficult to keep having used for a very minority language in a modern world. In order for a language to survive, nowadays, you need the language to also be very present on the internet. That means having a big community of native speakers and creators, media, literature, art, cinema, education, work... That's expensive and makes little sense for populations that are quite small I would reckon.
In the case of Sweden, which is already a small population, it must be difficult to keep having used for a very minority language in a modern world. In order for a language to survive, nowadays, you need the language to also be very present on the internet. That means having a big community of native speakers and creators, media, literature, art, cinema, education, work... That's expensive and makes little sense for populations that are quite small I would reckon.