In this section, we'll learn how to install and use Oasis Language.
npm i @oasis/language
# or upgrade to the latest version
npm update @oasis/language
if you use @masiv/addon-language you need to remove it
npm uninstall @masiv/addon-language
Once you've followed the process of Granting access to the dependencies you're able to install the Language by running the npm command:
IMPORTANT! Latest stable version: 1.0.13
Now, go ahead import, and install the library in the main.js file of your project /src folder as follows:
import OasisLang from '@oasis/language';
import lang from './language';
Vue.use(OasisLang,
{
language: lang, // or {} if you're not using a local lang dictionary
scope: 'appName',
});
You can keep the local dictionary and integrate it to the Ditto language.
Language local dictionary:
Inside the language folder, create 3 subfolders to store each language data.
|-src
|-language
|-en
|-es
|-pt
|-index.js
**Also create an index.js file to import the language files:
import es from './es';
import en from './en';
import pt from './pt';
export default { es, en, pt };
You need to change the name of the helpers