Adding Multilingual Support to your API
Apito engine has build in support for content localization. Content localization now-a-days is a crucial part of content api. If your target audience speaks different languages then your content should be able to accommodate this.
Configuring Localization Add-Ons​
Go to Settings > AddOns and click Config
on the Localization
AddOns. You will see a Drawer pops up from the right. It looks similar to the picture below
Choose you locals one after another and click the button at the button called Save
. Be sure to reload the page after doing so.
Configuring/Creating Localized Fields​
Now that you have added few locals from AddOns into your project you can configure your fields to adopt locals. It is very simple. While creating a fields simpley just check the box
called Enable Localization
and choose from the list of locals you have configured in the AddOns above. Whether you create or update your field you have now successfully configured
locals for your particular field.
Writing Multilingual Content​
Perquisite for writing Multilingual Content is
- Configuring Localization Add-Ons
- Configuring/Creating Localized Fields
After you successfully configured your AddOns and Fields now you can go to the Contents
from the top of the navigation and select your configured model. Then either publish or edit an
existing content, you will see similar picture like below. In the picture you can see two tabs English
& Portuguese
because we configured our Description
fields will be Multilingual
and will have support for both of those languages. You can now switch tabs to write different content
Always remember you can only update or publish content for one language at a time. For example. If you are publishing or editing a contents for both of the languages and during the
update or publish you are in the English
tab then only the changes made to english will be updated. if you made and changes to Portuguese
content, it will be ignored.
But to save both you have to switch tabs and click publish for each of them saperately.