support Click to see our new support page.
support For sales enquiry!

I18N In ODOO

I18N In ODOO
Author

AdhithFeb. 25, 2020

What is I18N? How I18N is used in Odoo?

Internationalization (I18N)

Internationalization is also known as Globalization. I18N is the design and development of a product, application or document content. Internationalization also enables the easy localization for target audiences that vary in culture, region, or language. The I18n in odoo contains the translation of module in different languages.

Localization refers to the adaptation of product. Sometimes localization is also written in I10N, 10 is the number of letters between I and N.

Internationalization is commonly written in I18N, that is, 18 is the number of letters between I and N.

In Odoo, the folder named I18 contains within the module.

I18 manages translation of modules in different languages.

Within the folder named I18, there are two types of files :

  1. .po files
  2. .pot files

Example:-

I18N Example

 

.po Files

  • PO should be name according to the language code of specific language.
  • These files contains the actual translations. Each language will have its own PO file.
  • PO files are simply text files and can thus be edit by any text editor. But there are also many tools available to make editing them easier.
  • .po files within a translation package are import automatically (if available) when new modules or themes will be enable. Or as new languages are add.

Example:-

PO file looks like :

# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account
# 
# Translators:
# Martin Trigaux, 2018
# Jessica Dowd <dowd.jess@gmail.com>, 2018
# Marli Grove <marligrove@gmail.com>, 2018
# Somarie, 2018
# D VA, 2018
# Andre de Kock <adekock11@gmail.com>, 2019
# 
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-29 09:07+0000\n"
"PO-Revision-Date: 2017-09-20 10:13+0000\n"
"Last-Translator: Andre de Kock <adekock11@gmail.com>, 2019\n"
"Language-Team: Afrikaans (https://www.transifex.com/odoo/teams/41243/af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: af\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: account
#: model:ir.model.fields,help:account.field_account_invoice_state
msgid ""
" * The 'Draft' status is used when a user is encoding a new and unconfirmed Invoice.\n"
" * The 'Open' status is used when user creates invoice, an invoice number is generated. 
It stays in the open status till the user pays the invoice.\n"
" * The 'Paid' status is set automatically when the invoice is paid. 
Its related journal entries may or may not be reconciled.\n"
" * The 'Cancelled' status is used when user cancel invoice."
msgstr ""

#. module: account
#: model:ir.model.fields,field_description:account.field_account_chart_template_code_digits
#: model:ir.model.fields,field_description:account.field_wizard_multi_charts_accounts_code_digit

.pot Files

They should be named according to the module name.

POT files are basically the template files for PO files.

Example:-

POT file looks like :

# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-29 09:07+0000\n"
"PO-Revision-Date: 2019-03-29 09:07+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account
#: model:ir.model.fields,help:account.field_account_invoice_state
msgid " * The 'Draft' status is used when a user is encoding a new and unconfirmed Invoice.\n"
" * The 'Open' status is used when user creates invoice, an invoice number is generated. 
It stays in the open status till the user pays the invoice.\n"
" * The 'Paid' status is set automatically when the invoice is paid. 
Its related journal entries may or may not be reconciled.\n"
" * The 'Cancelled' status is used when user cancel invoice."
msgstr ""

#. module: account
#: model:ir.model.fields,field_description:account.field_account_chart_template_code_digits
#: model:ir.model.fields,field_description:account.field_wizard_multi_charts_accounts_code_digits
msgid "# of Digits"
msgstr ""

#. module: account
#: model:ir.model.fields,field_description:account.field_res_config_settings_code_digits
msgid "# of Digits *"
msgstr ""

 

Odoo supports multi-company, multi-currency, multi language....etc.

To set-up multi-language :

Activate the developer mode

I18N activate developer mode

Within the settings - left side of your menu you can also see that :

Translations->Languages,Load a Translation, Import/Export, Application Terms

Click on Languages

We can see various types of languages. We can also activate or deactivate languages as your needs.

I18N languages

Click on the Load a Translation.

Language-: Name of the language.

overwrite existing terms-: To overwrite the current language.

website to translate-: We can apply website localhost or website 0.0.0.0.

18N website to translate

After selecting the options click on load.

If the message box appears “you must change the preference of the user to apply these changes” then :

settings->users & companies->users->preference

Click on languages. You can then see all the active languages.

Select the language and thereafter save.

internationalization user preference-odoo

Then continue the above step

We can then apply these changes and thereafter the page look like:

internationalization page change

 

You can also import/export translation by :

settings->Translations->import/export->import translations->

internationalization importorexport

 

Within the import option you can also chose the language,language code,file,overwrite existing language(if you need)

To create languages :

settings->Translations->import/export->export translations->

A number of terms in your modules are “implicitly translatable”. As a result, even if you haven’t done any specific work towards translation you can export your module’s translatable terms and may find content to work with.

internationalization export

 

If you want to see all translated terms :

settings->Translations->Application terms->Translated terms->

I18N translated terms

 

There is also an option to generate missing terms :

settings->Translation->Application terms->generate missing terms

odoo translated terms

 

odoo_erp_services

0

Leave a Comment