For {0_objective} could i have
"la" if is female. Otherwise "lo".
?
Thanks
"la" if is female. Otherwise "lo".
?
Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu <TradeWith>Trade with {0}</TradeWith>
<TradeWith>Negocia amb {0_definite}</TradeWith>
Quote from: mecatxis on September 13, 2018, 03:12:40 AMQuoteI do not speak this language at all (though same family language.). So, what is wrong with
- "Esteu segur que voleu fer fora {1_label} ?"
or
- "Esteu segur que voleu fer fora {1_nameDef} ?"
I will try to explain better. I am trying to use "WithDefiniteArticle" in the translation of the sentence "Do you really want to banish {1_label}" (this is how it shows in the original file).
I expected to get "Esteu segur que voleu fer fora el John" or "Esteu segur que voleu fer fora la Mary" depending on the gender of the subject.
I am asking how do i should implement the "WithDefiniteArticle" worker.
"Esteu segur que voleu fer fora {1_definite}?"
QuoteI do not speak this language at all (though same family language.). So, what is wrong with
- "Esteu segur que voleu fer fora {1_label} ?"
or
- "Esteu segur que voleu fer fora {1_nameDef} ?"
Quotewords ending in a stressed vowel form the plural by adding (-ns). Does any other language solved this problem? Any idea how to detect a stressed syllabe?
QuoteIf it's indefinite, it's a name, and the first character is either a vowel or h: use either 'l or 'n depending on the gender.
If it's definite, it's a name, and the first character is either a vowel or h: use either 'l or 'n depending on the gender.
If it's definite, it's not a name, and the first character is either a vowel or h: always use 'l
public override string WithIndefiniteArticle(string str, Gender gender, bool plural = false, bool name = false)
{
if( name )
char first = str[0];
if (IsVowelorh(first)
{
return (gender == Gender.Female ? "l/'" : "n/'") + str;
}
else
{
return (gender == Gender.Female ? "la " : "el ") + str;
}
else if( plural )
return (gender == Gender.Female ? "unes " : "uns ") + str;
else
return (gender == Gender.Female ? "una " : "un ") + str;
}
public override string WithDefiniteArticle(string str, Gender gender, bool plural = false, bool name = false)
{
if( name )
char first = str[0];
if (IsVowelorh(first)
{
return (gender == Gender.Female ? "l/'" : "n/'") + str;
}
else
{
return (gender == Gender.Female ? "la " : "el ") + str;
}
else if( plural )
return (gender == Gender.Female ? "les " : "els ") + str;
else
return (gender == Gender.Female ? "la " : "el ") + str;
}
public bool IsVowelorh(char ch)
{
return "aeiouàèéíòóúïüAEIOUÀÈÉÍÒÓÚÏÜ".IndexOf(ch) >= 0;
}
public override string OrdinalNumber(int number, Gender gender)
{
if ( gender == Gender.Female)
{
return number + "a";
}
else
{
if( int == 1 or int == 3)
return number + "r";
else if (int == 2)
return number + "n";
else if (int == 4)
return number + "t";
else
return number + "è";
}
}