--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/53D0A91F.2020909%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
public static String preferredLang;
The user merely sets the Mapfile.preferredLang before reading map data, and the map reader fetchesthe proper language out of the feature name string (or the local name if the specified language is not available). If you find these changes amenable,I will make a pull request.~Lincomatic
If you find these changes amenable, I will make a pull request.
This is similar to something I had suggested IIRC a long while ago.
I vaguely remembered issues with the length of the combined name string, but double checking with the spec there should not be any.
Also in favour of not altering map file format, but I think we will still need to advance map file format number, so that map reader software will know if the format is multilingual.
Also the preference will need to be passed in map reader to actually render in preferred language.
But that should be a separate pr and commit.
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/55E5507E.2080305%40gmail.com.
Also in favour of not altering map file format, but I think we will still need to advance map file format number, so that map reader software will know if the format is multilingual.
While this is possible, what advantage would be gained by this added complexity?
Any UTF-8 character that is blank or unprintable should not appear in an OSM name. I chose tab, but line feed and carriage returns are other examples of blank space that shouldn’t appear in a name. Unprintable characters such as SOH are even more unlikely. Even null works, but that will cause problems with C++ string functions.
It seems we need a filter on the command line to specify which languages to include in a multilingual map, rather than including all of them.
I am not sure how to share my current implementation just for discussion? Should I submit a PR for the purpose of discussion, even though we might decide to modify it?
preferredLanguage=en:de:jp
The parameter is copied into the map header during the map generation.
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/55E69496.9070505%40gmail.com.
use some non-printable character to separate languages (it just needs to be agreed on and be filtered out when processing names in the writer, just in case it happens to occur in OSM names)
have a command line argument for the writer that allows selecting languages.
There is also one language not mentioned here which is the default language for the tag "name" without qualification. In most cases this language should be included.
use some non-printable character to separate languages (it just needs to be agreed on and be filtered out when processing names in the writer, just in case it happens to occur in OSM names)
About filtering, can you elaborate how can be done without escape / unescape ?
have a command line argument for the writer that allows selecting languages.
You mean like the one mentioned above "preferred-languages=en,de,fr" ?
There is also one language not mentioned here which is the default language for the tag "name" without qualification. In most cases this language should be included.
Now when we define e.g. "preferred-language=en" we search for "name:en" and fallback to "name", which is quite useful in case of empty tags.
I think the "name" only tag will be the most frequent case, so my suggestion would be to have in the file
name, name:en, name:fr etc
and notname:en, name:fr with the default name copied into every single slot there, which I think would generate an enormous amount of duplication of names.
use some non-printable character to separate languages (it just needs to be agreed on and be filtered out when processing names in the writer, just in case it happens to occur in OSM names)
About filtering, can you elaborate how can be done without escape / unescape ?In rare, but not impossible case OSM name has our separator in it, simply replace it with a space in the name (I do not think that OSM names allow non-printable chars, but at least in the more distant past I have seen lots of irregular stuff)
have a command line argument for the writer that allows selecting languages.
You mean like the one mentioned above "preferred-languages=en,de,fr" ?Yes.There is also one language not mentioned here which is the default language for the tag "name" without qualification. In most cases this language should be included.
Now when we define e.g. "preferred-language=en" we search for "name:en" and fallback to "name", which is quite useful in case of empty tags.I think the "name" only tag will be the most frequent case, so my suggestion would be to have in the filename, name:en, name:fr etcand notname:en, name:fr with the default name copied into every single slot there, which I think would generate an enormous amount of duplication of names.
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/19db36e2-081f-48d2-8841-daab38a90ddc%40googlegroups.com.
I am in favour of wasting processing on the server to save space in the map file.