Not configurable urls for translated pages
The structure of the page links is defined in one way and cannot be changed.
You are defining the name to the main link (for main language) and other languages have their link extended with the trailing suffix corresponding to the language.
As an example: if you are using 3 languages: English (en), German (de), Spanish(es) and you have defined your 2 pages as:
urlpatterns = [
*candy.path('', views.home, name = 'home'),
*candy.path('contact', views.contact, name='contact')
]
Then you will get following urls available for website users:
http://MySite.com
http://MySite.com/de
http://MySite.com/es
http://MySite.com/contact
http://MySite.com/contact/de
http://MySite.com/contact/es
Your main language never receives suffix and suffix for other languages is in form of 2 letters as defined in:
ISO 639-1
You may experience sitemap.xml file to not fully correspond with your website
Sitemap should be properly generated for most websites but you may want to check it with your project.
There is a way to manually add missing urls or remove the ones that should not be in it.
You can do it with 3 lists called "add_pages", "remove_pages" and "remove_paths". All of them are optional for sitemap creation.
Examples:
urlpatterns = [
...
*candy.sitemap(add_pages=["http://MySite.com/PageToAdd"])
]
urlpatterns = [
...
*candy.sitemap(remove_pages=["http://MySite.com/PageToRemoveFromSitemap",
"http://MySite.com/PageToRemoveFromSitemap2"])
]
urlpatterns = [
...
*candy.sitemap(remove_paths=["http://MySite.com/PageAndSubpagesToRemoveFromSitemap",
"http://MySite.com/PageAndSubpagesToRemoveFromSitemap2"])
]
urlpatterns = [
...
*candy.sitemap(
add_pages=["http://MySite.com/PageToAdd"],
remove_pages=["http://MySite.com/PageToRemoveFromSitemap",
"http://MySite.com/PageToRemoveFromSitemap2"]
remove_paths=["http://MySite.com/PageAndSubpagesToRemoveFromSitemap",
"http://MySite.com/PageAndSubpagesToRemoveFromSitemap2"]
)
]
You cannot have multiple versions of the same language
Html standard allows you to distinguish the language based on the location where language is being used.
So eg you can have different version of the page for UK English and US English. With Candy Translate you can have only one version of each language