Note that for the Czech culture, the three translations are different. The French and English cultures share the same construction for the two last translated strings.
Applications often contain the strings to be translated in several places. The same string may have a different translation in certain locations within an app Razor views or class files.
A PO file supports the notion of a file context, which can be used to categorize the string being represented. Using a file context, a string can be translated differently, depending on the file context or lack of a file context.
The PO localization services use the name of the full class or the view that's used when translating a string. This is accomplished by setting the value on the msgctxt entry. Consider a minor addition to the previous fr. When no specific entry is matched with a given file context, Orchard Core's fallback mechanism looks for an appropriate PO file without a context. When more complex logic is needed to locate PO files, the OrchardCore. ILocalizationFileLocationProvider interface can be implemented and registered as a service.
This is useful when PO files can be stored in varying locations or when the files have to be found within a hierarchy of folders. The package includes a Plural extension method that's specific to two plural forms. For languages requiring more plural forms, create an extension method. With an extension method, you won't need to provide any localization file for the default language — the original strings are already available directly in the code.
You can use the more generic Plural int count, string[] pluralForms, params object[] arguments overload which accepts a string array of translations. Some advantages of using PO files instead. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode.
Configure portable object localization in ASP. Is this page helpful? Please rate your experience Yes No. Any additional feedback? View or download sample code how to download What is a PO file? PO files aren't compiled like.
As such, specialized tooling and build steps aren't required. If you are unsure about the correct language, check your wp-config. This is where you go through the translations one by one to ensure they are correct.
Basically the blue entries are the ones Google believes are correct. The red entries were translated, but had some issues. Most automatic translation tools attempt to reverse translate their translations to verify.
Red does not have to mean the translation is wrong, just that the system is unable to validate automatically. When you are finally done you can complete the translation. Project Workflows 3. Set up TM 4. Provide Context 5. Translations 6. Set up a team 7.
Communication 8. Manage translation process 9. After translation Sample data. Syntax in PO files. Transifex needs the PO files that are uploaded to Transifex to be syntactically correct.
You can check a PO file for syntax errors by running the command:. A valid PO comment should start with the character Comments are handled as developers notes in Transifex and there are 2 ways to define them in your PO file: add entries which have some white space immediately following the character add entries which start with.
So, for example, if a source string contains the following entries:. So, there are 2 things you need to take care of: Make sure that your. This line contains the number of plural forms and a formula.
0コメント