I use directionsLanguage get router infomation, By default, NAServer gets installed with en_US only , how to add additional languages?
Are you using the Directions Widget? If so try setting the directionsLanguage. See this post for details: Re: changing default instruction text in directions widget
I use RouteTask.Set the routeParams directionsLanguage option in order to display the output directions in a particular language.
routeParams.directionsLanguage= "vi";
my code is not working!!
It looks like Vietnamese is not one of the supported languages. See the directionsLanguage section of this help topic.
im do the same things as you write m but it is not working , is there configuration for the service
hii Mujeeb Abdul! not configuration for the service.to change the default language. You find the resources.xml file in the path C:\Program Files\ArcGIS\Server\NetworkAnalyst\Directions\resources.xml and translate it your language. you can refer to Atlas Đồng Nai
You can change the directionsLanguage by adding an argument to https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World to https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?directionsLanguage=vi
Source: https://developers.arcgis.com/rest/network/api-reference/route-synchronous-service.htm
List of languages:
ar—Arabic
bs—Bosnian
ca—Catalan
cs—Czech
da—Danish
de—German
el—Greek
en—English
es—Spanish
et—Estonian
fi—Finnish
fr—French
he—Hebrew
hr—Croatian
hu—Hungarian
id—Indonesian
it—Italian
ja—Japanese
ko—Korean
lt—Lithuanian
lv—Latvian
nb—Norwegian
nl—Dutch
pl—Polish
pt-BR—Portuguese (Brazil)
pt-PT—Portuguese (Portugal)
ro—Romanian
ru—Russian
sk—Slovak
sl—Slovenian
sr—Serbian
sv—Swedish
th—Thai
tr—Turkish
uk—Ukrainian
vi—Vietnamese
zh-CN—Chinese (China)
zh-HK—Chinese (Hong Kong)
zh-TW—Chinese (Taiwan)