Skip to content

Multilingual maps v4 #624

Closed
Closed

Description

@devemux86

Support more than one language in the map file.

Related forum topic is here.

Activity

  1. added a commit that references this issue on Sep 5, 2015
  2. added this to the milestone on Sep 5, 2015
  3. added a commit that references this issue on Sep 5, 2015
  4. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    @lincomatic @ludwigb
    I pushed some improvements / fixes to PR #666 (e.g. without language it skipped all other tags), adding also support for way names and writer tests.

  5. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    Right now the reader does not work with multiple languages as we have fixed:

    OptionalFields.LANGUAGE_PREFERENCE_LENGTH = 2;

    We need to do some clever handling there, I don't like much filling the API with static calls.

  6. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    BTW is the language preference '-' (equal to null) necessary?
    If we don't want language preference, we simply don't set one.

  7. added a commit that references this issue on Sep 5, 2015
  8. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    With 62a4e4d I renamed language option to 'preferred-languages'.

  9. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    As @ludwigb correctly suggested, I advanced map file format version to 4, denoting the multilingual nature.

  10. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    I pushed another set of improvements.

    @lincomatic
    Extensively testing the languages behavior, I don't find the description in Getting-Started-Map-Writer completely accurate. Concerning the statement:

    If only one language is specified, the specified language will be written if its tag is found, otherwise default tagless language will be written.

    I see that with either one or many preferred language(s), the default tagless language is always written, followed by the specified language(s).

  11. devemux86 commented on Sep 5, 2015

    @devemux86
    CollaboratorAuthor

    Remaining tasks:

    • Compare in writer: i.e. check if localized name:en is the same as the default name, to store the name only.
    • Fallback to base in writer (see Map-Writer preferred language fallback #664): I think right now the fallback is in the reader only (useful there too).
  12. 49 remaining items

  13. lincomatic commented on Sep 29, 2015

    @lincomatic
    Contributor

    "NOTE: Are we certain that we chose the most suitable separators?"

    I ran it through the entire planet, and there are no problems with the \b and \r separators occuring in strings. However, FYI, there were a few items that didn't contain the default "name" tag, only "name:xx"

    In the case of Paris, France, there are even certain ways which only have "name:left" and "name:right," but this case was already causing problems before we added the multilingual support

  14. ludwigb commented on Sep 30, 2015

    @ludwigb
    Collaborator

    Is there any policy what OSM does if there is no default name?

    I would suggest we just leave it empty, the cases are probably few and far
    between. Other option: use first available language from our language
    selection string.

    Ludwig

    On 30 September 2015 at 07:54, lincomatic [email protected] wrote:

    "NOTE: Are we certain that we chose the most suitable separators?"

    I ran it through the entire planet, and there are no problems with the \b
    and \r separators occuring in strings. However, FYI, there were a few items
    that didn't contain the default "name" tag, only "name:xx"

    In the case of Paris, France, there are even certain ways which only have
    "name:left" and "name:right," but this case was already causing problems
    before we added the multilingual support

    —
    Reply to this email directly or view it on GitHub
    #624 (comment)
    .

  15. devemux86 commented on Sep 30, 2015

    @devemux86
    CollaboratorAuthor

    Leaving it empty, would be my first thought too.
    In case of processing, I think it would be in reader.

  16. lincomatic commented on Sep 30, 2015

    @lincomatic
    Contributor

    yes, reader just needs to have some sort of logical way to handle it. There are very few occurrences of it in the whole planet, but it is disconcerting to see it in a major city such as Paris, where the current implementation will result in an unnamed street, since the language filter in the writer will skip over name:left/right. In the case of having no default "name" and only "name:lang" the easiest way is to just pick the first stored name if no matching language is found.

  17. ludwigb commented on Oct 1, 2015

    @ludwigb
    Collaborator

    There is no way mapsforge can deal with the level of inconsistencies in
    tagging. Plus one user's solution will not satisfy another one.

    It is really an OSM problem, IMHO.

    On 1 October 2015 at 07:54, lincomatic [email protected] wrote:

    yes, reader just needs to have some sort of logical way to handle it.
    There are very few occurrences of it in the whole planet, but it is
    disconcerting to see it in a major city such as Paris, where the current
    implementation will result in an unnamed street, since the language filter
    in the writer will skip over name:left/right. In the case of having no
    default "name" and only "name:lang" the easiest way is to just pick the
    first stored name if no matching language is found.

    —
    Reply to this email directly or view it on GitHub
    #624 (comment)
    .

  18. devemux86 commented on Oct 1, 2015

    @devemux86
    CollaboratorAuthor

    Yes such issues should be corrected first in OSM side.

    About picking another available name:X to fill the empty name, couldn't we have cases then where a country's element will be named with a foreign language (even with non latin characters)?

  19. applantation commented on Oct 1, 2015

    @applantation
    Collaborator

    I cannot really see any solution that will not have any strange side
    effects. What might work for one element will then have, as Emux says, an
    unwanted effect for many others.

    My suggestion would really be to then just leave it empty, as it is in OSM
    itself.

    On 1 October 2015 at 14:23, Emux [email protected] wrote:

    Yes such issues should to be corrected first in OSM side.

    About picking another available name:X to fill the empty name, then
    couldn't we have cases where an element in a country will be named with
    another country's language (even with non latin characters)?

    —
    Reply to this email directly or view it on GitHub
    #624 (comment)
    .

  20. devemux86 commented on Oct 1, 2015

    @devemux86
    CollaboratorAuthor

    May I ask - if anyone knows - why in France we have roads named like that (left / right) and how many are they (is it wrong naming or local feature) ?

  21. ludwigb commented on Oct 1, 2015

    @ludwigb
    Collaborator

    http://taginfo.openstreetmap.org/keys/name:left
    http://taginfo.openstreetmap.org/keys/name:right

    Looking at the values, it seems it is mostly used for boundaries (where it
    makes sense), not roads. There are 1258 highways with the tag name:right,
    some will also have the name tag.

    On 1 October 2015 at 14:35, Emux [email protected] wrote:

    May I ask - if anyone knows - why in France we have roads named like that
    (left / right) and how many are they (is it wrong naming or local feature) ?

    —
    Reply to this email directly or view it on GitHub
    #624 (comment)
    .

  22. devemux86 commented on Oct 24, 2015

    @devemux86
    CollaboratorAuthor

    I'm closing this as we have implemented all the needed functionality in both writer and reader and the multilingual maps are available for some time.

  23. changed the title [-]Multilingual maps[/-] [+]Multilingual maps v4[/+] on Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions