What is meaning of gettext('Some Text') in Openstack

95 views Asked by At

What is meaning of gettext('Some text are written')?. I am using openstack, there they have use gettext(), please see the following link openstack on github

I want to know meaning of it, if they are assigning the text to the variable why they didn't use just assignment opearator

$scope.label = {
  title: gettext('Instance Details'),
  instanceName: gettext('Instance Name'),
  availabilityZone: gettext('Availability Zone'),
  instance_count: gettext('Count'),
};
1

There are 1 answers

0
kTT On

It's probably related to localization. Function gettext is looking for translation of provided arguments and display them in selected locale.

As an example of translation service in angular, check https://angular-translate.github.io/